“java.lang.NoClassDefFoundError: com.google.android.gms.R$string error” After adding “libs/mpandroidchartlibrary-2-1-6.jar”

后端 未结 4 2005
慢半拍i
慢半拍i 2021-01-07 03:52

eI found this error after adding compile files(\'libs/mpandroidchartlibrary-2-1-6.jar\'). It work properly before adding mpandroidchartlibrary-2-1-6.jar

FAT

4条回答
  •  死守一世寂寞
    2021-01-07 04:12

    In app build.gradle file

    android {  
      defaultConfig { 
         multiDexEnabled true 
       }  
    }
    
    dependencies { 
       compile 'com.android.support:multidex:1.0.1'
    } 
    

    than in your Application class extends MultiDexApplication class

     public class myApplication extends MultiDexApplication {  
        @Override
        public void onCreate() {
           super.onCreate(); 
        }
     }
    

    than in your Manifest add myApplication class

    
    
    
        ....
    
    

提交回复
热议问题