Hello guys My application was all working fine till yesterday, i updated my SDK yesterday and it started giving error first it gave an error
No resou
Same error happened to me because I installed the debug apk that created inside outputs\apk folder and it turns to be smaller and with missing classes because it probably was the outcome of an instant run. So instead of turning instant run off just build APK (by Build->build apk in the menu) and use this one.
Write a class EnableMultiDex
like below
public class EnableMultiDex extends MultiDexApplication {
private static EnableMultiDex enableMultiDex;
public static Context context;
public EnableMultiDex(){
enableMultiDex=this;
}
public static EnableMultiDex getEnableMultiDexApp() {
return enableMultiDex;
}
@Override
public void onCreate() {
super.onCreate();
context = getApplicationContext();
}
}
and in AndroidManifest.xml
write this class inside Application tag
<application
android:name="YourPakageName.EnableMultiDex"
android:hardwareAccelerated="true"
android:icon="@drawable/launch_logo"
android:label="@string/app_name"
android:largeHeap="true"
tools:node="replace">
In my case my project began to work again after:
Yes may be above answer is correct I did not try as it is. But I resolved in opposite way is "You remove the instant run option in the settings of android studio"
Go to --> file menu --> select settings --> select build,execution,deployment-->select instant run --> un check the "enable instant run".
It was worked for me. but some applications like google maps integrated apps required Instant run.
Disable instant run worked for me I think this issue occurs because some class is missing when build with install run ( reduce apk size)