I get: Error:Execution failed for task ':app:transformClassesWithDexForDebug'. when making Google maps App

后端 未结 2 685
甜味超标
甜味超标 2020-12-20 09:55

I followed the instructions in this link: https://developers.google.com/maps/documentation/android-api/start to make a simple android app with Google Maps API but I always g

2条回答
  •  不思量自难忘°
    2020-12-20 10:17

    clean and see still error is there if yes,

    1.go to your build.gradle file. add multiDexEnabled true

     defaultConfig {
        multiDexEnabled true
    }
    

    2.in your dependencies add compile 'com.android.support:multidex:1.0.1'

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

    3.inside your application tag in menifest add android:name="android.support.multidex.MultiDexApplication"

    4.use this override method on your launching activity

     @Override
        protected void attachBaseContext(Context base) {
            super.attachBaseContext(base);
            MultiDex.install(this);
        }
    

提交回复
热议问题