When I ran my app, it said that
Cannot Instant Run: legacy multi-dex on Dalvik runtime
Does it means that I can't use Instant Run when I use multi-dex?
I'm using Android Studio beta4.
When I ran my app, it said that
Cannot Instant Run: legacy multi-dex on Dalvik runtime
Does it means that I can't use Instant Run when I use multi-dex?
I'm using Android Studio beta4.
In order to activate multiDex at old android versions you have to set multiDexEnabled to true, add dependency and extend your application class from MultiDexApplication or launch MultiDex.install(this) in your application class, which will cause legacy multiDex installation.
However since Intant Run can't work with legacy multiDex you have to use normal one. All you need is removing all that code above except of multiDexEnabled flag set to true. This method is only supported by devices with API 21 and above.
Feel free to correct me if something is wrong.
Just remove this line from your ProjectName/app/build.gradle
android { defaultConfig { multiDexEnabled true } }
remove multiDexEnabled true and you will able to instant run.