java.lang.NoClassDefFoundError: android.support.v7.app.AppCompatDelegateImplV14 in Android Studio

后端 未结 2 1861
走了就别回头了
走了就别回头了 2020-12-20 19:19

Here\'s the log.

java.lang.NoClassDefFoundError: android.support.v7.app.AppCompatDelegateImplV14
        at android.support.v7.app.AppCompatDelegate.create(A         


        
相关标签:
2条回答
  • 2020-12-20 19:47

    there might be a conflict with your dependencies

    try removing

    compile project(':android-support-v4')
    
    0 讨论(0)
  • 2020-12-20 19:54

    I had the same error and FULLY enabling multidex worked for me. here is what I did in gradle and manifest files

    android {
    compileSdkVersion 21
    buildToolsVersion "21.1.0"
    
    defaultConfig {
        ...
        minSdkVersion 14
        targetSdkVersion 21
        ...
    
        // Enabling multidex support.
        multiDexEnabled true
    }
    ...
    }
    
    dependencies {
    compile 'com.android.support:multidex:1.0.0'
    }
    

    also in my manifest file, I have add the MultiDexApplication class from the multidex support library to the application element like this

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
       package="com.example.android.multidex.myapplication">
       <application
           ...
           android:name="android.support.multidex.MultiDexApplication">
           ...
       </application>
    </manifest>
    
    0 讨论(0)
提交回复
热议问题