Android Build Error



  • Hi Everyone.

    I have a monthly developer plan.

    When I try to build my app to android occurs error below:

    Temporary folder: /private/tmp/monaca/5755ebd17e21939021af13b4
    Downloading project
    Download complete
    Running for 5.2
    plugin add mobi.monaca.plugins.Monaca
    No ALTQ support in kernel
    ALTQ related functions disabled
    pfctl: pf already enabled
    Fetching plugin "mobi.monaca.plugins.Monaca" via npm
    Installing "mobi.monaca.plugins.Monaca" for android
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf disabled
    plugin add mobi.monaca.plugins.MonacaBackend
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf enabled
    Fetching plugin "mobi.monaca.plugins.MonacaBackend" via npm
    Installing "mobi.monaca.plugins.MonacaBackend" for android
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf disabled
    plugin add mobi.monaca.plugins.datepicker
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf enabled
    Fetching plugin "mobi.monaca.plugins.datepicker" via npm
    Installing "mobi.monaca.plugins.datepicker" for android
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf disabled
    plugin add cordova-plugin-whitelist@1.0.0
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf enabled
    Fetching plugin "cordova-plugin-whitelist@1.0.0" via npm
    Installing "cordova-plugin-whitelist" for android
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf disabled
    plugin add cordova-plugin-splashscreen@2.1.0
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf enabled
    Fetching plugin "cordova-plugin-splashscreen@2.1.0" via npm
    Installing "cordova-plugin-splashscreen" for android
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf disabled
    plugin add cordova-plugin-inappbrowser@1.0.1
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf enabled
    Fetching plugin "cordova-plugin-inappbrowser@1.0.1" via npm
    Installing "cordova-plugin-inappbrowser" for android
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf disabled
    plugin add https://github.com/floatinghotpot/cordova-plugin-admob
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf enabled
    Fetching plugin "https://github.com/floatinghotpot/cordova-plugin-admob" via git clone
    Repository "https://github.com/floatinghotpot/cordova-plugin-admob" checked out to git ref "master".
    Installing "cordova-plugin-admob" for android
    Fetching plugin "com.google.admobsdk" via npm
    Fetching plugin "com.google.admobsdk" via cordova plugins registry
    Installing "com.google.admobsdk" for android
    Fetching plugin "com.google.playservices@19.0.0" via npm
    WARNING: com.google.playservices has been renamed to cordova-plugin-googleplayservices. You may not be getting the latest version! We suggest you cordova plugin rm com.google.playservices and cordova plugin add cordova-plugin-googleplayservices.
    Fetching plugin "com.google.playservices@19.0.0" via cordova plugins registry
    Installing "com.google.playservices" for android
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf disabled
    Project has 7 plugins.
    9 plugins has been installed.
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf enabled
    Running command: /private/tmp/monaca/5755ebd17e21939021af13b4/android/skeleton/hooks/after_prepare/monaca_enterprise_android.js /private/tmp/monaca/5755ebd17e21939021af13b4/android/skeleton
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf disabled
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf enabled
    Running command: /private/tmp/monaca/5755ebd17e21939021af13b4/android/skeleton/platforms/android/cordova/build --release
    ANDROID_HOME=/Applications/android-sdk-macosx
    JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home
    Running: /private/tmp/monaca/5755ebd17e21939021af13b4/android/skeleton/platforms/android/gradlew cdvBuildRelease -b /private/tmp/monaca/5755ebd17e21939021af13b4/android/skeleton/platforms/android/build.gradle -Dorg.gradle.daemon=true
    :preBuild
    :preReleaseBuild
    :checkReleaseManifest
    :CordovaLib:compileLint
    :CordovaLib:copyReleaseLint UP-TO-DATE
    :CordovaLib:mergeReleaseProguardFiles
    :CordovaLib:preBuild
    :CordovaLib:preReleaseBuild
    :CordovaLib:checkReleaseManifest
    :CordovaLib:prepareReleaseDependencies
    :CordovaLib:compileReleaseAidl
    :CordovaLib:compileReleaseRenderscript
    :CordovaLib:generateReleaseBuildConfig
    :CordovaLib:generateReleaseAssets UP-TO-DATE
    :CordovaLib:mergeReleaseAssets
    :CordovaLib:generateReleaseResValues
    :CordovaLib:generateReleaseResources
    :CordovaLib:packageReleaseResources
    :CordovaLib:processReleaseManifest
    :CordovaLib:processReleaseResources
    :CordovaLib:generateReleaseSources
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    :CordovaLib:compileReleaseJava
    :CordovaLib:processReleaseJavaRes UP-TO-DATE
    :CordovaLib:packageReleaseJar
    :CordovaLib:compileReleaseNdk
    :CordovaLib:packageReleaseJniLibs UP-TO-DATE
    :CordovaLib:packageReleaseLocalJar UP-TO-DATE
    :CordovaLib:packageReleaseRenderscript UP-TO-DATE
    :CordovaLib:bundleRelease
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:compileLint
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:copyReleaseLint UP-TO-DATE
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:mergeReleaseProguardFiles
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:preBuild
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:preReleaseBuild
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:checkReleaseManifest
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:prepareAndroidCordovaLibUnspecifiedReleaseLibrary
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:prepareReleaseDependencies
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:compileReleaseAidl
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:compileReleaseRenderscript
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:generateReleaseBuildConfig
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:generateReleaseAssets UP-TO-DATE
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:mergeReleaseAssets
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:generateReleaseResValues
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:generateReleaseResources
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:mergeReleaseResources
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:processReleaseManifest
    warning: string 'auth_client_needs_enabling_title' has no default translation.
    warning: string 'auth_client_needs_installation_title' has no default translation.
    warning: string 'auth_client_needs_update_title' has no default translation.
    warning: string 'auth_client_play_services_err_notification_msg' has no default translation.
    warning: string 'auth_client_requested_by_msg' has no default translation.
    warning: string 'auth_client_using_bad_version_title' has no default translation.
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:processReleaseResources
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:generateReleaseSources
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:compileReleaseJava
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:processReleaseJavaRes UP-TO-DATE
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:packageReleaseJar
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:compileReleaseNdk
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:packageReleaseJniLibs UP-TO-DATE
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:packageReleaseLocalJar
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:packageReleaseRenderscript UP-TO-DATE
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:packageReleaseResources
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:bundleRelease
    :prepareAndroidCordovaLibUnspecifiedReleaseLibrary
    :prepareAndroidMobiMonacaPluginsMonacaBackendGooglePlayServices_libUnspecifiedReleaseLibrary
    :prepareReleaseDependencies
    :compileReleaseAidl
    :compileReleaseRenderscript
    :generateReleaseBuildConfig
    :generateReleaseAssets UP-TO-DATE
    :mergeReleaseAssets
    :generateReleaseResValues
    :generateReleaseResources
    :mergeReleaseResources
    :processReleaseManifest
    warning: string 'auth_client_needs_enabling_title' has no default translation.
    warning: string 'auth_client_needs_installation_title' has no default translation.
    warning: string 'auth_client_needs_update_title' has no default translation.
    warning: string 'auth_client_play_services_err_notification_msg' has no default translation.
    warning: string 'auth_client_requested_by_msg' has no default translation.
    warning: string 'auth_client_using_bad_version_title' has no default translation.
    :processReleaseResources
    :generateReleaseSources
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    :compileReleaseJava
    :lintVitalRelease
    :compileReleaseNdk
    :preDexRelease

    UNEXPECTED TOP-LEVEL EXCEPTION:
    com.android.dex.DexException: Multiple dex files define Lcom/google/ads/AdRequest$ErrorCode;
    at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
    at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
    at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
    at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
    at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
    at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
    at com.android.dx.command.dexer.Main.run(Main.java:277)
    at com.android.dx.command.dexer.Main.main(Main.java:245)
    at com.android.dx.command.Main.main(Main.java:106)

    :dexRelease FAILED

    FAILURE: Build failed with an exception.

    • What went wrong:
      Execution failed for task ':dexRelease'.
      > com.android.ide.common.internal.LoggedErrorException: Failed to run command:
      /Applications/android-sdk-macosx/build-tools/23.0.1/dx --dex --output /private/tmp/monaca/5755ebd17e21939021af13b4/android/skeleton/platforms/android/build/intermediates/dex/release --input-list=/private/tmp/monaca/5755ebd17e21939021af13b4/android/skeleton/platforms/android/build/intermediates/tmp/dex/release/inputList.txt
      Error Code:
      2
      Output:

      UNEXPECTED TOP-LEVEL EXCEPTION:
      com.android.dex.DexException: Multiple dex files define Lcom/google/ads/AdRequest$ErrorCode;
      at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
      at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
      at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
      at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
      at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
      at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)
      at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
      at com.android.dx.command.dexer.Main.run(Main.java:277)
      at com.android.dx.command.dexer.Main.main(Main.java:245)
      at com.android.dx.command.Main.main(Main.java:106)

    • 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: 39.894 secs

    /private/tmp/monaca/5755ebd17e21939021af13b4/android/skeleton/platforms/android/cordova/node_modules/q/q.js:126
    throw e;
    ^
    Error code 1 for command: /private/tmp/monaca/5755ebd17e21939021af13b4/android/skeleton/platforms/android/gradlew with args: cdvBuildRelease,-b,/private/tmp/monaca/5755ebd17e21939021af13b4/android/skeleton/platforms/android/build.gradle,-Dorg.gradle.daemon=true
    ERROR building one of the platforms: Error: /private/tmp/monaca/5755ebd17e21939021af13b4/android/skeleton/platforms/android/cordova/build: Command failed with exit code 8
    You may not have the required environment or OS to build this project
    Error: /private/tmp/monaca/5755ebd17e21939021af13b4/android/skeleton/platforms/android/cordova/build: Command failed with exit code 8
    at ChildProcess.whenDone (/data/monaca_build_module/5.2/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:755:16)
    at Process.ChildProcess._handle.onexit (child_process.js:822:5)
    Build error: Error building project source code

    Could you help me?

    Thanks

    Paulo



  • @pcamargo75 said:

    com.android.dex.DexException: Multiple dex files define

    Well, your error is regarding multiple files defined. Usually, the error occurs when you have the same library/directory included more than once in your build.gradle’s dependencies. What all plugins are you actually using? Basically, start with disabling anything you do not use in config and resolve any conflicts.



  • I use: ngcordova, cordova, onsen ui

    About plugins, I use: inAppBrowser, DataPicker



  • 0_1465252924127_Capture.PNG

    This is my components



  • 0_1465253116261_Capture_2.PNG



  • Android Manifest

    <?xml version=“1.0” encoding=“utf-8”?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:hardwareAccelerated=“true” android:versionCode="" android:versionName=“1.0.0” android:windowSoftInputMode=“adjustPan” package=“com.sw9.mypocket”>
    <supports-screens android:anyDensity=“true” android:largeScreens=“true” android:normalScreens=“true” android:resizeable=“true” android:smallScreens=“true” android:xlargeScreens=“true”/>
    <uses-permission android:name=“android.permission.INTERNET”/>
    <application android:hardwareAccelerated=“true” android:icon="@drawable/icon" android:label=“MyPocket”>
    <activity android:configChanges=“orientation|keyboardHidden|keyboard|screenSize|locale” android:label=“MyPocket” android:name=“MainActivity” android:theme="@android:style/Theme.Black.NoTitleBar">
    <intent-filter>
    <action android:name=“android.intent.action.MAIN”/>
    <category android:name=“android.intent.category.LAUNCHER”/>
    </intent-filter>
    </activity>
    </application>
    <uses-sdk android:minSdkVersion=“14” android:targetSdkVersion=“22”/>
    </manifest>



  • I take it you added the ngCordova and Angular? Those are built in and you don’t need to add them. Same goes for Onsen UI. That would probably be why you are getting that error. I never add anything on new projects for base functionality, so the top two are the only ones utilized be default.



  • Thanks. Does Onsen UI include ngCordova and Angular? I need the ngCordova to implement AdMob



  • Onsen includes the compatible version of Angular. For Admob, I highly highly recommend Admob Plugin Pro. It is hands down the easiest to implement and does not require any additional libraries. https://github.com/floatinghotpot/cordova-admob-pro



  • Thank you again.

    Yes, I am trying to implement and use cordova-admob-pro using angular js.

    I will try to use native cordova-admob-pro and not cordova-adm-pro with ngcordova.

    One more question. Do you know if admob work only in production (not emulation mode)?



  • @pcamargo75 No plugins work in the Monaca Cloud IDE preview panel as plugins require the Android OS to operate. To test it properly, use the Monaca Debugger and the ads will show. Don’t forget to set isTesting to true.

    Also, what functions are you needing for it to work in Angular? You should be able to use the plain JS with Angular that I originally discussed with you here: https://community.onsen.io/topic/423/admob-integration/2



  • I cleanned up my project, removing angular and ngCordova libraries.

    After that, I tried to run debug build and received the same message below:

    Temporary folder: /private/tmp/monaca/57577038fd17349b477bbb14
    Downloading project
    Download complete
    Running for 5.2
    plugin add mobi.monaca.plugins.Monaca
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf enabled
    Fetching plugin "mobi.monaca.plugins.Monaca" via npm
    Installing "mobi.monaca.plugins.Monaca" for android
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf disabled
    plugin add mobi.monaca.plugins.MonacaBackend
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf enabled
    Fetching plugin "mobi.monaca.plugins.MonacaBackend" via npm
    Installing "mobi.monaca.plugins.MonacaBackend" for android
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf disabled
    plugin add mobi.monaca.plugins.datepicker
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf enabled
    Fetching plugin "mobi.monaca.plugins.datepicker" via npm
    Installing "mobi.monaca.plugins.datepicker" for android
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf disabled
    plugin add cordova-plugin-whitelist@1.0.0
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf enabled
    Fetching plugin "cordova-plugin-whitelist@1.0.0" via npm
    Installing "cordova-plugin-whitelist" for android
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf disabled
    plugin add cordova-plugin-splashscreen@2.1.0
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf enabled
    Fetching plugin "cordova-plugin-splashscreen@2.1.0" via npm
    Installing "cordova-plugin-splashscreen" for android
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf disabled
    plugin add cordova-plugin-inappbrowser@1.0.1
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf enabled
    Fetching plugin "cordova-plugin-inappbrowser@1.0.1" via npm
    Installing "cordova-plugin-inappbrowser" for android
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf disabled
    plugin add https://github.com/floatinghotpot/cordova-admob-pro
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf enabled
    Fetching plugin "https://github.com/floatinghotpot/cordova-admob-pro" via git clone
    Repository "https://github.com/floatinghotpot/cordova-admob-pro" checked out to git ref "master".
    Installing "cordova-plugin-admobpro" for android
    Fetching plugin "cordova-plugin-extension" via npm
    Installing "cordova-plugin-extension" for android
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf disabled
    Project has 7 plugins.
    8 plugins has been installed.
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf enabled
    Running command: /private/tmp/monaca/57577038fd17349b477bbb14/android/skeleton/hooks/after_prepare/monaca_enterprise_android.js /private/tmp/monaca/57577038fd17349b477bbb14/android/skeleton
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf disabled
    No ALTQ support in kernel
    ALTQ related functions disabled
    pf enabled
    Running command: /private/tmp/monaca/57577038fd17349b477bbb14/android/skeleton/platforms/android/cordova/build --debug
    ANDROID_HOME=/Applications/android-sdk-macosx
    JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home
    Running: /private/tmp/monaca/57577038fd17349b477bbb14/android/skeleton/platforms/android/gradlew cdvBuildDebug -b /private/tmp/monaca/57577038fd17349b477bbb14/android/skeleton/platforms/android/build.gradle -Dorg.gradle.daemon=true
    :preBuild
    :compileDebugNdk
    :preDebugBuild
    :checkDebugManifest
    :CordovaLib:compileLint
    :CordovaLib:copyDebugLint UP-TO-DATE
    :CordovaLib:mergeDebugProguardFiles
    :CordovaLib:preBuild
    :CordovaLib:preDebugBuild
    :CordovaLib:checkDebugManifest
    :CordovaLib:prepareDebugDependencies
    :CordovaLib:compileDebugAidl
    :CordovaLib:compileDebugRenderscript
    :CordovaLib:generateDebugBuildConfig
    :CordovaLib:generateDebugAssets UP-TO-DATE
    :CordovaLib:mergeDebugAssets
    :CordovaLib:generateDebugResValues
    :CordovaLib:generateDebugResources
    :CordovaLib:packageDebugResources
    :CordovaLib:processDebugManifest
    :CordovaLib:processDebugResources
    :CordovaLib:generateDebugSources
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    :CordovaLib:compileDebugJava
    :CordovaLib:processDebugJavaRes UP-TO-DATE
    :CordovaLib:packageDebugJar
    :CordovaLib:compileDebugNdk
    :CordovaLib:packageDebugJniLibs UP-TO-DATE
    :CordovaLib:packageDebugLocalJar UP-TO-DATE
    :CordovaLib:packageDebugRenderscript UP-TO-DATE
    :CordovaLib:bundleDebug
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:compileLint
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:copyDebugLint UP-TO-DATE
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:mergeDebugProguardFiles
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:preBuild
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:preDebugBuild
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:checkDebugManifest
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:preDebugTestBuild
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:prepareAndroidCordovaLibUnspecifiedDebugLibrary
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:prepareDebugDependencies
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:compileDebugAidl
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:compileDebugRenderscript
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:generateDebugBuildConfig
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:generateDebugAssets UP-TO-DATE
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:mergeDebugAssets
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:generateDebugResValues
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:generateDebugResources
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:mergeDebugResources
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:processDebugManifest
    warning: string 'auth_client_needs_enabling_title' has no default translation.
    warning: string 'auth_client_needs_installation_title' has no default translation.
    warning: string 'auth_client_needs_update_title' has no default translation.
    warning: string 'auth_client_play_services_err_notification_msg' has no default translation.
    warning: string 'auth_client_requested_by_msg' has no default translation.
    warning: string 'auth_client_using_bad_version_title' has no default translation.
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:processDebugResources
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:generateDebugSources
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:compileDebugJava
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:processDebugJavaRes UP-TO-DATE
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:packageDebugJar
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:compileDebugNdk
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:packageDebugJniLibs UP-TO-DATE
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:packageDebugLocalJar
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:packageDebugRenderscript UP-TO-DATE
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:packageDebugResources
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:bundleDebug
    :prepareAndroidCordovaLibUnspecifiedDebugLibrary
    :prepareAndroidMobiMonacaPluginsMonacaBackendGooglePlayServices_libUnspecifiedDebugLibrary
    :preReleaseBuild
    :CordovaLib:copyReleaseLint UP-TO-DATE
    :CordovaLib:mergeReleaseProguardFiles
    :CordovaLib:preReleaseBuild
    :CordovaLib:checkReleaseManifest
    :CordovaLib:prepareReleaseDependencies
    :CordovaLib:compileReleaseAidl
    :CordovaLib:compileReleaseRenderscript
    :CordovaLib:generateReleaseBuildConfig
    :CordovaLib:generateReleaseAssets UP-TO-DATE
    :CordovaLib:mergeReleaseAssets
    :CordovaLib:generateReleaseResValues
    :CordovaLib:generateReleaseResources
    :CordovaLib:packageReleaseResources
    :CordovaLib:processReleaseManifest
    :CordovaLib:processReleaseResources
    :CordovaLib:generateReleaseSources
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    :CordovaLib:compileReleaseJava
    :CordovaLib:processReleaseJavaRes UP-TO-DATE
    :CordovaLib:packageReleaseJar
    :CordovaLib:compileReleaseNdk
    :CordovaLib:packageReleaseJniLibs UP-TO-DATE
    :CordovaLib:packageReleaseLocalJar UP-TO-DATE
    :CordovaLib:packageReleaseRenderscript UP-TO-DATE
    :CordovaLib:bundleRelease
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:copyReleaseLint UP-TO-DATE
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:mergeReleaseProguardFiles
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:preReleaseBuild
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:checkReleaseManifest
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:prepareAndroidCordovaLibUnspecifiedReleaseLibrary
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:prepareReleaseDependencies
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:compileReleaseAidl
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:compileReleaseRenderscript
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:generateReleaseBuildConfig
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:generateReleaseAssets UP-TO-DATE
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:mergeReleaseAssets
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:generateReleaseResValues
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:generateReleaseResources
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:mergeReleaseResources
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:processReleaseManifest
    warning: string 'auth_client_needs_enabling_title' has no default translation.
    warning: string 'auth_client_needs_installation_title' has no default translation.
    warning: string 'auth_client_needs_update_title' has no default translation.
    warning: string 'auth_client_play_services_err_notification_msg' has no default translation.
    warning: string 'auth_client_requested_by_msg' has no default translation.
    warning: string 'auth_client_using_bad_version_title' has no default translation.
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:processReleaseResources
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:generateReleaseSources
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:compileReleaseJava
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:processReleaseJavaRes UP-TO-DATE
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:packageReleaseJar
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:compileReleaseNdk
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:packageReleaseJniLibs UP-TO-DATE
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:packageReleaseLocalJar
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:packageReleaseRenderscript UP-TO-DATE
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:packageReleaseResources
    :mobi.monaca.plugins.MonacaBackend:google-play-services_lib:bundleRelease
    :prepareComAndroidSupportSupportV42220Library
    :prepareComGoogleAndroidGmsPlayServicesAds830Library
    :prepareComGoogleAndroidGmsPlayServicesBasement830Library
    :prepareDebugDependencies
    :compileDebugAidl
    :compileDebugRenderscript
    :generateDebugBuildConfig
    :generateDebugAssets UP-TO-DATE
    :mergeDebugAssets
    :generateDebugResValues
    :generateDebugResources
    :mergeDebugResources
    :processDebugManifest
    warning: string 'auth_client_needs_enabling_title' has no default translation.
    warning: string 'auth_client_needs_installation_title' has no default translation.
    warning: string 'auth_client_needs_update_title' has no default translation.
    warning: string 'auth_client_play_services_err_notification_msg' has no default translation.
    warning: string 'auth_client_requested_by_msg' has no default translation.
    warning: string 'auth_client_using_bad_version_title' has no default translation.
    :processDebugResources FAILED

    FAILURE: Build failed with an exception.

    • What went wrong:
      Execution failed for task ':processDebugResources'.
      > Error: more than one library with package name 'com.google.android.gms'
      You can temporarily disable this error with android.enforceUniquePackageName=false
      However, this is temporary and will be enforced in 1.0

    • 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: 9.614 secs

    /private/tmp/monaca/57577038fd17349b477bbb14/android/skeleton/platforms/android/cordova/node_modules/q/q.js:126
    throw e;
    ^
    Error code 1 for command: /private/tmp/monaca/57577038fd17349b477bbb14/android/skeleton/platforms/android/gradlew with args: cdvBuildDebug,-b,/private/tmp/monaca/57577038fd17349b477bbb14/android/skeleton/platforms/android/build.gradle,-Dorg.gradle.daemon=true
    ERROR building one of the platforms: Error: /private/tmp/monaca/57577038fd17349b477bbb14/android/skeleton/platforms/android/cordova/build: Command failed with exit code 8
    You may not have the required environment or OS to build this project
    Error: /private/tmp/monaca/57577038fd17349b477bbb14/android/skeleton/platforms/android/cordova/build: Command failed with exit code 8
    at ChildProcess.whenDone (/data/monaca_build_module/5.2/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:755:16)
    at Process.ChildProcess._handle.onexit (child_process.js:822:5)
    Build error: Error building project source code

    What does exactly mean the report below?

    • What went wrong:
      Execution failed for task ':processDebugResources'.
      > Error: more than one library with package name 'com.google.android.gms'
      You can temporarily disable this error with android.enforceUniquePackageName=false
      However, this is temporary and will be enforced in 1.0


  • Well a new error, so progress, YAY! But, I had this issue as well and did the following:

    https://community.onsen.io/topic/312/android-build-failed

    I removed the camera and monaca backend plugin as they weren’t being used and tried again, this time it worked!

    So, I would confirm you have removed every unused plugin.


  • Monaca

    Backend plugin caused some problems during the build process but we should have fixed the issue two days ago. If it doesn’t build without that plugin, please open a support request here



  • Thanks @Andi for responding. I always feel good when my suggestion is on point with Onsen’s!



  • So many thanks. I have followed your suggestion and removed monaca backend plugin.

    Finally, my app was built.

    Thanks Munsterlander and Andi for your assistance.


  • Monaca

    glad you were able to solve it! :D


Log in to reply