내 Android Studio는 2.3 버전입니다. 코드를 실행하려고하지만 다음 오류가 발생하여 응용 프로그램이 실패하고 문제가 무엇인지 확실하지 않습니다. 여기 오류 : 'app : transformClassesEnhancedWithInstantReloadDexForDebug'의 실행에 실패했습니다.
오류입니다 :Error:Execution failed for task ':app:transformClassesEnhancedWithInstantReloadDexForDebug' com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Error while executing java process with main class com.android.dx.command.Main with arguments {--dex --force-jumbo --num-threads=4 --output C:\project\app\build\intermediates\reload-dex\debug C:\project\app\build\intermediates\reload-dex\debug\classes.jar}
build.gradle :이
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.ucmedia.project"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
apply plugin: 'com.android.application'
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}}
dexOptions {
preDexLibraries false
javaMaxHeapSize "4g"
jumboMode true
}}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
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:25.2.0'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
compile 'com.android.support:design:25.2.0'
testCompile 'junit:junit:4.12'
}
나는 다음과 같은 있지만 오류가 계속 발생 시도 :
- 청소 및 다시 빌드 프로젝트
- 프로젝트를 Android Studio에 외부 소스로 다시 가져 왔습니다.
- 모두 병일 및 빌드 디렉토리의 lib 파일을 삭제하십시오.
- 폴더를 제거하십시오 .gradle.idea 폴더.
- 업그레이드/다운 그레이드 gradle/sdk.
- app.iml 파일에 지원 라이브러리가 중복되어 있는지 확인하십시오.
- 멀티 플렉스을 추가하십시오. 'com.google.android.gms : 플레이 서비스 : 8.1.0'
당신이'org.gradle을 추가하여 예를 들어, 최대 힙 크기를 증가하려고했다. jvmargs = -Xmx4608M'을 'gradle.properties'로 변경 하시겠습니까? – JonesV
방금 시도했지만 작동하지 않았습니다. – ucMedia
build.gradle의 "dexOptions"에서 "javaMaxHeapSize"를 줄입니다 (예 : 1g). – JonesV