Skip to content Skip to sidebar Skip to footer

Instrumentation Run Failed Due To 'java.lang.noclassdeffounderror' After Adding Multidex To My Application

This is the continuation of this question: Unable to merge dex - how to exclude proper jar? I have not a typical android project, i am just working on the separate module, which is

Solution 1:

You may have to add MultiDexApplication in the AndroidManifest:

<?xml version="1.0" encoding="utf-8"?><manifestxmlns:android="http://schemas.android.com/apk/res/android"package="com.example.myapp"><applicationandroid:name="com.example.myapp.MyApplication" >
    ...
</application>

If you do override the Application class, change it to extend MultiDexApplication (if possible) as follows:

publicclassMyApplicationextendsMultiDexApplication { ... }

Check this Google official blog here for MultiDex support

Post a Comment for "Instrumentation Run Failed Due To 'java.lang.noclassdeffounderror' After Adding Multidex To My Application"