2017-04-08 43 views
1

在Android Studio 2.3.1更新之後,沒有應用程序,甚至沒有運行Hello World。當點擊運行時,會顯示此錯誤。未能在Android Studio中運行或模擬基本應用程序2.3.1

Error:Error converting bytecode to dex: Cause: java.lang.RuntimeException: Exception parsing classes Error:Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: Unable to pre-dex 'C:\Android.android\build-cache\d6387c5ba7dcecea41b28c91351efa5624be8874\output\jars\classes.jar' to 'C:\Users\Deven\AndroidStudioProjects\ErrCheck\app\build\intermediates\transforms\dex\debug\folders\1000\10\classes_bff1bfdc5860437f946a228fbddc9242cb4ec753'

這僅僅是一個沒有任何編輯的hello世界應用程序。

這裏是我的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' 
} 
+0

'構建>清潔工程'等待清理結束,然後'建設>重建工程' – Aryan

+0

我試過但同樣的錯誤。即使構建apk不起作用。 –

+0

您是否啓用了MultiDex? – Sanjeet

回答

0

這是Android的工作室本身的故障。我需要重新安裝它,並且錯誤已在更高版本中修復。

相關問題