[英]Failure to run or emulate basic apps in Android Studio 2.3.1
Android Studio 2.3.1更新后,沒有應用程序,甚至沒有Hello World運行。 單擊運行時會顯示此錯誤。
錯誤:將字節碼轉換為dex時出錯:原因:java.lang.RuntimeException:異常解析類錯誤:任務':app:transformClassesWithDexForDebug'的執行失敗。 com.android.build.api.transform.TransformException:java.lang.RuntimeException:java.lang.RuntimeException:無法預先解釋'C:\\ Android.android \\ build-cache \\ d6387c5ba7dcecea41b28c91351efa5624be8874 \\ output \\ jars \\ classes.jar '到'C:\\ Users \\ Deven \\ AndroidStudioProjects \\ ErrCheck \\ app \\ build \\ intermediates \\ transforms \\ dex \\ debug \\ folders \\ 1000 \\ 10 \\ classes_bff1bfdc5860437f946a228fbddc9242cb4ec753'
這僅適用於沒有任何編輯的hello world應用程序。
這是我的build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.example.android.errcheck"
minSdkVersion 23
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
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:multidex:1.0.1'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}
這是Android Studio本身的錯誤。 我需要重新安裝它,並在以后的版本中修復了該錯誤。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.