UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/iid/MessengerCompat;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:591)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:546)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:528)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:164)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504)
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)
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':transformClassesWithDexForDebug'.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Error: Error code 1 for command: /private/tmp/monaca/59677525ff2af23a6cca7a73/project/platforms/android/gradlew with args: cdvBuildDebug,-b,/private/tmp/monaca/59677525ff2af23a6cca7a73/project/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true
]
monacaにcordova-admob-proとNCMBのプラグインを併用した場合にandroidビルドができません。 どちらか一方を削除した場合はビルドができます。 ios用では問題がありません。 どちらもmonaca公式でチュートリアルが出ているプラグインなのですが、併用は無理なのでしょうか? (追記:あれから色々な開発環境で試して見ましたが、visual studio、パソコン内でcordovaを構築した場合、に関しては、どれも二つのプラグインを入れた時点でビルドができなくなりました。) 以下エラーメッセージ
`` Fetch queue Info... Start building 59677525ff2af23a6cca7a73 Setup working directories... Download project archive... Extract project archive... Fetch project info... Webview:null Arch:null cordova version: 6.2.0
preBuild - buildForAndroid
Cordova create - $ /data/build-server/cordova/6.2.0/bin/cordova create /tmp/monaca/59677525ff2af23a6cca7a73/project Creating a new cordova project.
Copy .monaca-res directory -
Copy config.xml -
Cordova platform add - $ /data/build-server/cordova/6.2.0/bin/cordova platform list $ /data/build-server/cordova/6.2.0/bin/cordova platform add /data/build-server/cordova/platforms/android/5.1.1 Adding android project... Creating Cordova project for the Android platform: Path: platforms/android Package: com.takuya.tramp1 Name: tramp1 Activity: MainActivity Android target: android-23 Android project created with cordova-android@5.1.1
Copy external plugin setting files -
Copy www files -
Cordova plugin add - $ /data/build-server/cordova/6.2.0/bin/cordova plugin add mobi.monaca.plugins.Monaca $ /data/build-server/cordova/6.2.0/bin/cordova plugin add cordova-plugin-whitelist@1.2.2 $ /data/build-server/cordova/6.2.0/bin/cordova plugin add cordova-plugin-splashscreen@3.2.2 $ /data/build-server/cordova/6.2.0/bin/cordova plugin add cordova-custom-config@2.0.3 $ /data/build-server/cordova/6.2.0/bin/cordova plugin add https://github.com/floatinghotpot/cordova-admob-pro.git $ /data/build-server/cordova/6.2.0/bin/cordova plugin add ncmb-push-monaca-plugin@2.0.6 $ /data/build-server/cordova/6.2.0/bin/cordova plugin add ncmb-push-monaca-plugin@2.0.2
Cordova prepare - $ /data/build-server/cordova/6.2.0/bin/cordova prepare android cordova-custom-config: Skipping auto-restore of config file backup(s)
Cordova compile - $ /data/build-server/cordova/6.2.0/bin/cordova compile --debug --device ANDROID_HOME=/data/android-sdk JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home :preBuild UP-TO-DATE :preDebugBuild UP-TO-DATE :checkDebugManifest :CordovaLib:preBuild UP-TO-DATE :CordovaLib:preDebugBuild UP-TO-DATE :CordovaLib:compileDebugNdk UP-TO-DATE :CordovaLib:compileLint :CordovaLib:copyDebugLint UP-TO-DATE :CordovaLib:mergeDebugProguardFiles :CordovaLib:packageDebugRenderscript UP-TO-DATE :CordovaLib:checkDebugManifest :CordovaLib:prepareDebugDependencies :CordovaLib:compileDebugRenderscript :CordovaLib:generateDebugResValues :CordovaLib:generateDebugResources :CordovaLib:packageDebugResources :CordovaLib:compileDebugAidl :CordovaLib:generateDebugBuildConfig :CordovaLib:generateDebugAssets UP-TO-DATE :CordovaLib:mergeDebugAssets :CordovaLib:processDebugManifest :CordovaLib:processDebugResources :CordovaLib:generateDebugSources :CordovaLib:compileDebugJavaWithJavac :CordovaLib:processDebugJavaRes UP-TO-DATE :CordovaLib:transformResourcesWithMergeJavaResForDebug :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug :CordovaLib:mergeDebugJniLibFolders :CordovaLib:transformNative_libsWithMergeJniLibsForDebug :CordovaLib:transformNative_libsWithSyncJniLibsForDebug :CordovaLib:bundleDebug :prepareAndroidCordovaLibUnspecifiedDebugLibrary :preReleaseBuild UP-TO-DATE :CordovaLib:preReleaseBuild UP-TO-DATE :CordovaLib:compileReleaseNdk UP-TO-DATE :CordovaLib:copyReleaseLint UP-TO-DATE :CordovaLib:mergeReleaseProguardFiles :CordovaLib:packageReleaseRenderscript UP-TO-DATE :CordovaLib:checkReleaseManifest :CordovaLib:prepareReleaseDependencies :CordovaLib:compileReleaseRenderscript :CordovaLib:generateReleaseResValues :CordovaLib:generateReleaseResources :CordovaLib:packageReleaseResources :CordovaLib:compileReleaseAidl :CordovaLib:generateReleaseBuildConfig :CordovaLib:generateReleaseAssets UP-TO-DATE :CordovaLib:mergeReleaseAssets :CordovaLib:processReleaseManifest :CordovaLib:processReleaseResources :CordovaLib:generateReleaseSources :CordovaLib:compileReleaseJavaWithJavac :CordovaLib:processReleaseJavaRes UP-TO-DATE :CordovaLib:transformResourcesWithMergeJavaResForRelease :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease :CordovaLib:mergeReleaseJniLibFolders :CordovaLib:transformNative_libsWithMergeJniLibsForRelease :CordovaLib:transformNative_libsWithSyncJniLibsForRelease :CordovaLib:bundleRelease :prepareComAndroidSupportSupportV42221Library :prepareComGoogleAndroidGmsPlayServicesAds1101Library :prepareComGoogleAndroidGmsPlayServicesAdsLite1101Library :prepareComGoogleAndroidGmsPlayServicesBase1101Library :prepareComGoogleAndroidGmsPlayServicesBasement1101Library :prepareComGoogleAndroidGmsPlayServicesClearcut1101Library :prepareComGoogleAndroidGmsPlayServicesGass1101Library :prepareComGoogleAndroidGmsPlayServicesGcm810Library :prepareComGoogleAndroidGmsPlayServicesSafetynet1101Library :prepareComGoogleAndroidGmsPlayServicesTasks1101Library :prepareDebugDependencies :compileDebugAidl :compileDebugRenderscript :generateDebugBuildConfig :generateDebugAssets UP-TO-DATE :mergeDebugAssets :generateDebugResValues :generateDebugResources :mergeDebugResources :processDebugManifest :processDebugResources :generateDebugSources :compileDebugJavaWithJavac :compileDebugNdk UP-TO-DATE :compileDebugSources :transformClassesWithDexForDebug FAILED
BUILD FAILED
Total time: 44.653 secs
UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/iid/MessengerCompat; at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:591) at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:546) at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:528) at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:164) at com.android.dx.merge.DexMerger.merge(DexMerger.java:188) at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504) 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)
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':transformClassesWithDexForDebug'.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Error: Error code 1 for command: /private/tmp/monaca/59677525ff2af23a6cca7a73/project/platforms/android/gradlew with args: cdvBuildDebug,-b,/private/tmp/monaca/59677525ff2af23a6cca7a73/project/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true ]