Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 30345

java.lang.RuntimeException: Unable to instantiate application com.todos.MyApplication: java.lang.ClassNotFoundException

$
0
0
W/dalvikvm(21732): threadid=1: thread exiting with uncaught exception (group=0x41d0cda0)E/Drive.UninstallOperation( 1829): Package still installed com.todosE/AndroidRuntime(21732): FATAL EXCEPTION: mainE/AndroidRuntime(21732): Process: com.todos, PID: 21732E/AndroidRuntime(21732): java.lang.RuntimeException: Unable to instantiate application com.todos.MyApplication: java.lang.ClassNotFoundException: Didn't find class "com.todos.MyApplication" on path: DexPathList[[zip file "/data/app/com.todos-3.apk"],nativeLibraryDirectories=[/data/app-lib/com.todos-3, /vendor/lib, /system/lib]]E/AndroidRuntime(21732): at android.app.LoadedApk.makeApplication(LoadedApk.java:507)E/AndroidRuntime(21732): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4841)E/AndroidRuntime(21732): at android.app.ActivityThread.access$1600(ActivityThread.java:174)E/AndroidRuntime(21732): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1381)E/AndroidRuntime(21732): at android.os.Handler.dispatchMessage(Handler.java:102)E/AndroidRuntime(21732): at android.os.Looper.loop(Looper.java:146)E/AndroidRuntime(21732): at android.app.ActivityThread.main(ActivityThread.java:5731)E/AndroidRuntime(21732): at java.lang.reflect.Method.invokeNative(Native Method)E/AndroidRuntime(21732): at java.lang.reflect.Method.invoke(Method.java:515)E/AndroidRuntime(21732): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)E/AndroidRuntime(21732): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)E/AndroidRuntime(21732): at dalvik.system.NativeStart.main(Native Method)E/AndroidRuntime(21732): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.todos.MyApplication" on path: DexPathList[[zip file "/data/app/com.todos-3.apk"],nativeLibraryDirectories=[/data/app-lib/com.todos-3, /vendor/lib, /system/lib]]E/AndroidRuntime(21732): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:67)E/AndroidRuntime(21732): at java.lang.ClassLoader.loadClass(ClassLoader.java:497)E/AndroidRuntime(21732): at java.lang.ClassLoader.loadClass(ClassLoader.java:457)E/AndroidRuntime(21732): at android.app.Instrumentation.newApplication(Instrumentation.java:981)E/AndroidRuntime(21732): at android.app.LoadedApk.makeApplication(LoadedApk.java:502)E/AndroidRuntime(21732): ... 11 moreW/ActivityManager(  757):   Force finishing activity com.todos/.MainActivityW/DropBoxManagerService(  757): Dropping: data_app_crash (1781 > 0 bytes)

My AndroidManifest looks like the following...

<uses-permission android:name="android.permission.INTERNET" /><uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/><uses-sdk      android:minSdkVersion="16"      android:targetSdkVersion="22" /><application    android:allowBackup="true"    android:label="@string/app_name"    android:icon="@mipmap/ic_launcher"    android:theme="@style/AppTheme"    android:name="com.todos.MyApplication"><meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/><activity      android:name=".MainActivity"      android:label="@string/app_name"      android:configChanges="keyboard|keyboardHidden|orientation|screenSize"><intent-filter><action android:name="android.intent.action.MAIN" /><category android:name="android.intent.category.LAUNCHER" /></intent-filter></activity><activity android:name="com.facebook.react.devsupport.DevSettingsActivity" /></application>

This started breaking when I added com.todos.MyApplication source file...

enter image description here

When I open the project in Android Studio and navigate to MyApplication.java I see the following...

enter image description here


Viewing all articles
Browse latest Browse all 30345

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>