Runtimeexception: Unable to Instantiate Application

RuntimeException: Unable to instantiate application

This is a verbose error message raised by underlying framework when dalvik re-install .apk file and trying to reuse or recycle the previous opened activity/view from the same package (if you haven't closed the previous installed app yet). It has nothing to do with your app, moreover, it is very unlikely that your app will get freezed or crashed cause by this verbose error message on end user's device.

It seems that this dalvik verbose error log only happend on Android 4.0 system, I've tested it myself on Android 3.2 and 2.3.3 running environment, where you cannot replicate to get this message shown on neither of them. A similar question has been discussed before at here and someone has filled a bug report in Android Issues Tracker.

I don't think you should concern too much about this verbose error log at the moment, if you look more logs before and after this red error in Logcat, you can see the full story and find that the previous opened activity/view (which are marked as died state) get killed and the newly re-installed one get poped ultimately.

RuntimeException: Unable to instantiate application com.company.app.Application: ClassNotFoundException

In the module level build.gradle, we added these lines:

// Near the top
apply plugin: 'com.google.firebase.crashlytics'

// ...

android {

// ...

compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}

// ...
}

// ...

I have no idea how this fixed this crash, but I suppose that's what I get for using "It just works" libraries.

Unable to instantiate application: java.lang.ClassNotFoundException:

Thank you @Dileep Patel
I faced the same issue. App only worked if it's installed from Android Studio and crashed if it's installed by adb command. Invalidate caches/Restart and disabling Instant Run(Android Studio->Preferences->Instant Run, uncheck "Enable Instance Run") worked in my case.

FLUTTER ERROR: java.lang.RuntimeException: Unable to instantiate application

perhaps the issue is because flutter can't access your App on launch due to flutter/dart configuration in your project structure. Maybe you can try default Flutter Application name in your AndroidManifest.xml. See image below.

<application android:name="io.flutter.app.FlutterApplication" android:label="AppLabel">

AndroidManifest.xml

: Unable to instantiate application and ClassNotFound while sharing apk

I faced the same issue today, I have currently downgraded my gradle version and the generated debug apk works just fine, Feel like it might be an issue with the gradle version, will Update on this answer if i find with the actual issue.

But currently downgrading gradle from 2.3.0 to 2.2.0 seems to fix the issue.



Related Topics



Leave a reply



Submit