Android Build fails on Ionic Pro but works locally


#1

Hi I’m setting up Ionic Pro. Packaging the iOS app is working fine, but Android fails. Can someone give me a helping hand, what is wrong?

Here are the last lines of the console. I don’t know if the problem is inside my manifest or in signing. The thing is that I can build locally.

:compileReleaseRenderscript
:generateReleaseBuildConfig
:generateReleaseResValues
:generateReleaseResources
:mergeReleaseResources
/usr/src/app/platforms/android/AndroidManifest.xml:25:5-60 Error:
	Element uses-feature#android.hardware.camera at AndroidManifest.xml:25:5-60 duplicated with element declared at AndroidManifest.xml:24:5-84
/usr/src/app/platforms/android/AndroidManifest.xml Error:
	Validation failed, exiting
:processReleaseManifest

See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.

:processReleaseManifest FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processReleaseManifest'.
> Manifest merger failed with multiple errors, see logs

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1 mins 3.291 secs
Error: /usr/src/app/platforms/android/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/usr/src/app/platforms/android/AndroidManifest.xml:25:5-60 Error:
	Element uses-feature#android.hardware.camera at AndroidManifest.xml:25:5-60 duplicated with element declared at AndroidManifest.xml:24:5-84
/usr/src/app/platforms/android/AndroidManifest.xml Error:
	Validation failed, exiting

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processReleaseManifest'.
> Manifest merger failed with multiple errors, see logs

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
cordova build android --release -- --keystore=android.keystore --storePassword=***** --alias=MyApp --password=***** failed
Running after script...
$ run "clean-up"
Running Stage clean-up for Job: 5536719
ERROR: Job failed: exit status 1