Exception when building and running ReconSDKApplication

99 views
Skip to first unread message

mga...@cogsimtech.com

unread,
Jun 13, 2013, 11:11:34 PM6/13/13
to recon-de...@googlegroups.com
All,

I'm an experienced developer (C++/C#) but am new to Java, Android and the Mod Live platform.

When I follow the instructions on the Mod Live developer website to use "adb install ..." to install the downloadable (i.e., pre-built) "ReconSDKApplication.apk", the demo application runs fine.  However, when I import the source code into eclipse, build, install and run my locally generated "ReconSDKApplication.apk", I encounter an exception:

06-13 22:40:23.632: E/AndroidRuntime(12416): FATAL EXCEPTION: main
06-13 22:40:23.632: E/AndroidRuntime(12416): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.reconinstruments.reconsdkapplication/com.reconinstruments.reconsdkapplication.ReconSDKApplicationActivity}: java.lang.ClassNotFoundException: com.reconinstruments.reconsdkapplication.ReconSDKApplicationActivity in loader dalvik.system.PathClassLoader[/data/app/com.reconinstruments.reconsdkapplication-2.apk]
06-13 22:40:23.632: E/AndroidRuntime(12416): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1569)
06-13 22:40:23.632: E/AndroidRuntime(12416): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
06-13 22:40:23.632: E/AndroidRuntime(12416): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
06-13 22:40:23.632: E/AndroidRuntime(12416): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
06-13 22:40:23.632: E/AndroidRuntime(12416): at android.os.Handler.dispatchMessage(Handler.java:99)
06-13 22:40:23.632: E/AndroidRuntime(12416): at android.os.Looper.loop(Looper.java:130)
06-13 22:40:23.632: E/AndroidRuntime(12416): at android.app.ActivityThread.main(ActivityThread.java:3683)
06-13 22:40:23.632: E/AndroidRuntime(12416): at java.lang.reflect.Method.invokeNative(Native Method)
06-13 22:40:23.632: E/AndroidRuntime(12416): at java.lang.reflect.Method.invoke(Method.java:507)
06-13 22:40:23.632: E/AndroidRuntime(12416): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
06-13 22:40:23.632: E/AndroidRuntime(12416): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
06-13 22:40:23.632: E/AndroidRuntime(12416): at dalvik.system.NativeStart.main(Native Method)
06-13 22:40:23.632: E/AndroidRuntime(12416): Caused by: java.lang.ClassNotFoundException: com.reconinstruments.reconsdkapplication.ReconSDKApplicationActivity in loader dalvik.system.PathClassLoader[/data/app/com.reconinstruments.reconsdkapplication-2.apk]
06-13 22:40:23.632: E/AndroidRuntime(12416): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
06-13 22:40:23.632: E/AndroidRuntime(12416): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
06-13 22:40:23.632: E/AndroidRuntime(12416): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
06-13 22:40:23.632: E/AndroidRuntime(12416): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
06-13 22:40:23.632: E/AndroidRuntime(12416): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
06-13 22:40:23.632: E/AndroidRuntime(12416): ... 11 more

Any suggestions?  Any and all help is appreciated.  

We're really excited at the prospect of writing software for the Mod Live HUD.

Thanks!

mga...@cogsimtech.com

unread,
Jun 18, 2013, 3:32:46 PM6/18/13
to recon-de...@googlegroups.com
Anyone?

Patrick Cho ( Recon Android Developer )

unread,
Jun 18, 2013, 9:39:14 PM6/18/13
to recon-de...@googlegroups.com
I had no problem when I imported the project to eclipse and ran it.

It must be .jar file import issue.

You can try clean build. And remove ReconSDK.jar from the build path ( Right Click on the Project -> Properties -> Java Build Path -> Libraries )

and then from the Package Explorer ( on the Left Panel ) find /libs folder and right click on the ReconSDK.jar file -> Build Path -> Add to Build Path

And tell us what happened.

Also there is a lot of resource about this particular issue on Google + StackOverflow.

Occasionally I face this issue too. Good luck with it.

Stu Smith

unread,
Jun 25, 2013, 7:05:56 AM6/25/13
to recon-de...@googlegroups.com
add the jar manually under project/properties, etc
 
did the same with me.
Reply all
Reply to author
Forward
0 new messages