【发布时间】:2017-09-15 06:43:53
【问题描述】:
注意这个问题不匹配,因为我找不到任何可行的解决方案。
我已经使用了几乎所有过程来解决这个问题,但仍然面临同样的问题。
第一:multiDexEnabled true
第二:compile 'com.android.support:multidex:1.0.1'
第三:org.gradle.jvmargs=-XX\:MaxHeapSize\=512m -Xmx512m(在Local.properties)
第四:android:name="android.support.multidex.MultiDexApplication"(在manifest.xml)
第五:Clean & Rebuild
第六:File Invalidate cache & Restart
如果有人正在寻找解决方案,这些可能对您有用。但对我来说,没有一个工作。
我该怎么办? (我正在做数字钱包项目)。
错误:1:
Error:Error converting bytecode to dex:
Cause: java.lang.RuntimeException: Exception parsing classes
错误 2:Error:1 error; aborting
错误3:
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Return code 1 for dex process
build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.example.intuition.paytmprogress"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
multiDexEnabled true
// testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.android.support:multidex:1.0.1'
// PayTm
compile files('libs/PGSDK_V2.0.jar')
compile files('libs/paytm-checksum_2.0.jar')
compile files('libs/jackson-databind-2.9.1.jar')
//Freecharge
// compile 'com.android.support:support-v4:+'
// compile 'in.freecharge.checkout.android:freecharge-checkout-android-sdk:2.2@aar'
// compile 'in.juspay:godel:0.6.12.1423'
}
【问题讨论】:
-
发布你的 gradle 文件
-
当然。给我 2 秒。
-
@BhuvaneshBs 完成..