Tip: Apache Cordova and Android: Unable to instantiate activity ComponentInfo
===

This one really got my nerves. After 2-3 days of going through the various sources, I found a solution to a common problem that arises.

The context is based on the PhoneGap demo provided using Android <a>http://j.mp/MB1pTM</a>. The demo itself, failed for me while doing the exact setup for Android 4.0.3 using PhoneGap API documentation. I get the below error message:

    07-16 23:01:58.485: E/AndroidRuntime(778): FATAL EXCEPTION: main
    07-16 23:01:58.485: E/AndroidRuntime(778): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.test.shreyas.main/com.test.shreyas.main.HelloCordovaActivity}: java.lang.ClassNotFoundException: com.test.shreyas.main.HelloCordovaActivity
    07-16 23:01:58.485: E/AndroidRuntime(778): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1880)
    07-16 23:01:58.485: E/AndroidRuntime(778): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
    07-16 23:01:58.485: E/AndroidRuntime(778): 	at android.app.ActivityThread.access$600(ActivityThread.java:123)
    07-16 23:01:58.485: E/AndroidRuntime(778): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
    07-16 23:01:58.485: E/AndroidRuntime(778): 	at android.os.Handler.dispatchMessage(Handler.java:99)
    07-16 23:01:58.485: E/AndroidRuntime(778): 	at android.os.Looper.loop(Looper.java:137)
    07-16 23:01:58.485: E/AndroidRuntime(778): 	at android.app.ActivityThread.main(ActivityThread.java:4424)
    07-16 23:01:58.485: E/AndroidRuntime(778): 	at java.lang.reflect.Method.invokeNative(Native Method)
    07-16 23:01:58.485: E/AndroidRuntime(778): 	at java.lang.reflect.Method.invoke(Method.java:511)
    07-16 23:01:58.485: E/AndroidRuntime(778): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
    07-16 23:01:58.485: E/AndroidRuntime(778): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
    07-16 23:01:58.485: E/AndroidRuntime(778): 	at dalvik.system.NativeStart.main(Native Method)
    07-16 23:01:58.485: E/AndroidRuntime(778): Caused by: java.lang.ClassNotFoundException: com.test.shreyas.main.HelloCordovaActivity
    07-16 23:01:58.485: E/AndroidRuntime(778): 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
    07-16 23:01:58.485: E/AndroidRuntime(778): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
    07-16 23:01:58.485: E/AndroidRuntime(778): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
    07-16 23:01:58.485: E/AndroidRuntime(778): 	at android.app.Instrumentation.newActivity(Instrumentation.java:1023)
    07-16 23:01:58.485: E/AndroidRuntime(778): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871)
    07-16 23:01:58.485: E/AndroidRuntime(778): 	... 11 more
