简体   繁体   中英

My Cordova project won't compiles after Installing Appodeal Plugins

Everything goes fine with my project but it won't compiles if I include these Plugins

com.appodeal.plugin

com.appodeal.googleplayservices

PS: I'm following this tutorial step 2

Here the logs I get

:compileDebugJavaWithJavacNote: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

:compileDebugNdk UP-TO-DATE
:compileDebugSources
:transformClassesWithDexForDebug
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
    at com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:484)
    at com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:261)
    at com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:473)
    at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:161)
    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)


 FAILED

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_65.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.

BUILD FAILED

I don't know about Java and details of Cordova native configs, I'm only web developer, sorry

I know it's a bit late to reply, but if anyone would have same problem, here is the solution:

cordova plugin add https://github.com/jwall149/cordova-multidex

Or you can also add the cordova plugin directly to the package.json

{
  "locator": "https://github.com/jwall149/cordova-multidex",
  "id": "cordova-multidex"
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM