The widgets work fine, but the main activity FC’s.
The logcat is below:
04-22 14:13:58.045: D/AndroidRuntime(2479): Shutting down VM
04-22 14:13:58.045: W/dalvikvm(2479): threadid=1: thread exiting with uncaught exception (group=0x40018560)
04-22 14:13:58.065: E/AndroidRuntime(2479): FATAL EXCEPTION: main
04-22 14:13:58.065: E/AndroidRuntime(2479): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.liamwli.reboot_widget/com.liamwli.reboot_widget.RebootwidgetActivity}: java.lang.ClassNotFoundException: com.liamwli.reboot_widget.RebootwidgetActivity in loader dalvik.system.PathClassLoader[/data/app/com.liamwli.reboot_widget-2.apk]
04-22 14:13:58.065: E/AndroidRuntime(2479): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1680)
04-22 14:13:58.065: E/AndroidRuntime(2479): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1784)
04-22 14:13:58.065: E/AndroidRuntime(2479): at android.app.ActivityThread.access$1500(ActivityThread.java:123)
04-22 14:13:58.065: E/AndroidRuntime(2479): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:939)
04-22 14:13:58.065: E/AndroidRuntime(2479): at android.os.Handler.dispatchMessage(Handler.java:99)
04-22 14:13:58.065: E/AndroidRuntime(2479): at android.os.Looper.loop(Looper.java:130)
04-22 14:13:58.065: E/AndroidRuntime(2479): at android.app.ActivityThread.main(ActivityThread.java:3835)
04-22 14:13:58.065: E/AndroidRuntime(2479): at java.lang.reflect.Method.invokeNative(Native Method)
04-22 14:13:58.065: E/AndroidRuntime(2479): at java.lang.reflect.Method.invoke(Method.java:507)
04-22 14:13:58.065: E/AndroidRuntime(2479): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
04-22 14:13:58.065: E/AndroidRuntime(2479): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
04-22 14:13:58.065: E/AndroidRuntime(2479): at dalvik.system.NativeStart.main(Native Method)
04-22 14:13:58.065: E/AndroidRuntime(2479): Caused by: java.lang.ClassNotFoundException: com.liamwli.reboot_widget.RebootwidgetActivity in loader dalvik.system.PathClassLoader[/data/app/com.liamwli.reboot_widget-2.apk]
04-22 14:13:58.065: E/AndroidRuntime(2479): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
04-22 14:13:58.065: E/AndroidRuntime(2479): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
04-22 14:13:58.065: E/AndroidRuntime(2479): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
04-22 14:13:58.065: E/AndroidRuntime(2479): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
04-22 14:13:58.065: E/AndroidRuntime(2479): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1672)
04-22 14:13:58.065: E/AndroidRuntime(2479): ... 11 more
I am new to android app development, and do not know what the issue is 🙁
Android is looking for a class named
com.liamwli.reboot_widget.RebootwidgetActivityand cannot find it. Make sure you have everything spelled correctly, including capitalization.I would also recommend getting rid of the underscore in your package name, as that may be causing you problems. Java packages normally are letters, numbers, and dots.