Unable to run instantly: stale multi-screen while Dalvik is running

When I launched the application, he said that

Unable to run instantly: deprecated multi-dex at runtime Dalvik

Does this mean that I cannot use Instant Run when I use multi-dex?

I am using Android Studio beta4.

+5
source share
3 answers

To activate multiDex in older versions of Android, you must set the value of multiDexEnabled to true, add a dependency and extend the application class from MultiDexApplication or run MultiDex.install (this) in your application class, which will lead to an outdated multiDex installation.

However, since Intant Run cannot work with legacy multiDex, you should use normal. All you need to do is remove all this code except the multiDexEnabled flag set to true. This method is only supported by devices with API 21 and higher.

Feel free to correct me if something is wrong.

+3
source

Just remove this line from ProjectName / app / build.gradle

android { defaultConfig { multiDexEnabled true } }

remove multiDexEnabled true and you can instantly start.

0
source

As mentioned in the documentation, Instant Run is disabled by Android Studio if multidex is turned on for API level 20 or lower, and the application is deployed at API level 20 or lower.

Documentation Link

0
source

Source: https://habr.com/ru/post/1243037/


All Articles