アプリで Payumoney を追加中にエラーが発生しました。ここにエラーがあります -
予期しないトップレベルの例外:
`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)
atcom.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java0)
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)`
これが build.gradle(app) ファイルコードです
apply plugin: 'com.android.application'
Android { compileSdkVersion 23 buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.xxxxxxxxxxx"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}}
repositories {
maven { url "https://jitpack.io" }}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:design:23.2.1'
compile 'com.github.PhilJay:MPAndroidChart:v2.2.3'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.squareup.picasso:picasso:2.3.2'
compile project(':viewPagerLib')
compile project(':PayU-release')
compile project(':sdkui')
compile 'com.google.android.gms:play-services:8.4.0'}
ここに build.gradle(project) があります
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
classpath 'com.github.dcendents:android-maven-plugin:1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}}
allprojects {
repositories {
jcenter()
}}
task clean(type: Delete) {
delete rootProject.buildDir}
build.gradleでmultidex trueを使用すると、エラーは解決しましたが、最初の画面でアプリがクラッシュしました。