Issue with instant run and Google Maps

395 views Asked by At

There seems to be an issue with instant run and Google Maps. Upon re-running an application to see changes, if the application is using Google Maps, a crash will occur. Here is part of the stack trace:

java.lang.RuntimeException: 
android.content.res.Resources$NotFoundException: File res/drawable/common_google_signin_btn_text_light_focused.xml from drawable resource ID 
           at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
           ........
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/common_google_signin_btn_text_light_focused.xml from drawable resource ID 
          at android.content.res.Resources.loadDrawableForCookie(Resources.java:2640)
          .....
Caused by: android.content.res.Resources$NotFoundException: File res/drawable-xxhdpi-v4/maps_btn_myl_pressed.png from drawable resource ID

The crash is occuring because of a ResourcesNotFoundException, which seems to be caused by files such as those listed in the above stacktrace.

Has anyone run into this issue, and if so, what is the fix?

1

There are 1 answers

0
Ali Reza On

try this in gradle file :

android {  
    defaultConfig {  
         vectorDrawables.useSupportLibrary = true  
        }  
}

and use latest buildToolsVersion '28.0.3'