Android Question Basic4android to eclipse

apty

Active Member
Licensed User
Longtime User
I tried to run a basic4android project in eclipse. I imported the project, added the core.jar and b4ashared.jar without any errors. However when i try to run it, i get the following error

HTML:
05-20 11:13:41.481: E/Trace(936): error opening trace file: No such file or directory (2)
05-20 11:13:41.821: I/dalvikvm(936): Failed resolving Lb4a/example/main; interface 21 'Lanywheresoftware/b4a/B4AActivity;'
05-20 11:13:41.842: W/dalvikvm(936): Link of class 'Lb4a/example/main;' failed
05-20 11:13:41.842: D/AndroidRuntime(936): Shutting down VM
05-20 11:13:41.842: W/dalvikvm(936): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
05-20 11:13:41.912: E/AndroidRuntime(936): FATAL EXCEPTION: main
05-20 11:13:41.912: E/AndroidRuntime(936): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{b4a.example/b4a.example.main}: java.lang.ClassNotFoundException: Didn't find class "b4a.example.main" on path: /data/app/b4a.example-1.apk
05-20 11:13:41.912: E/AndroidRuntime(936):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2106)
05-20 11:13:41.912: E/AndroidRuntime(936):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
05-20 11:13:41.912: E/AndroidRuntime(936):    at android.app.ActivityThread.access$600(ActivityThread.java:141)
05-20 11:13:41.912: E/AndroidRuntime(936):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
05-20 11:13:41.912: E/AndroidRuntime(936):    at android.os.Handler.dispatchMessage(Handler.java:99)
05-20 11:13:41.912: E/AndroidRuntime(936):    at android.os.Looper.loop(Looper.java:137)
05-20 11:13:41.912: E/AndroidRuntime(936):    at android.app.ActivityThread.main(ActivityThread.java:5041)
05-20 11:13:41.912: E/AndroidRuntime(936):    at java.lang.reflect.Method.invokeNative(Native Method)
05-20 11:13:41.912: E/AndroidRuntime(936):    at java.lang.reflect.Method.invoke(Method.java:511)
05-20 11:13:41.912: E/AndroidRuntime(936):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
05-20 11:13:41.912: E/AndroidRuntime(936):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
05-20 11:13:41.912: E/AndroidRuntime(936):    at dalvik.system.NativeStart.main(Native Method)
05-20 11:13:41.912: E/AndroidRuntime(936): Caused by: java.lang.ClassNotFoundException: Didn't find class "b4a.example.main" on path: /data/app/b4a.example-1.apk
05-20 11:13:41.912: E/AndroidRuntime(936):    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
05-20 11:13:41.912: E/AndroidRuntime(936):    at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
05-20 11:13:41.912: E/AndroidRuntime(936):    at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
05-20 11:13:41.912: E/AndroidRuntime(936):    at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
05-20 11:13:41.912: E/AndroidRuntime(936):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
05-20 11:13:41.912: E/AndroidRuntime(936):    ... 11 more
05-20 11:13:49.852: I/Process(936): Sending signal. PID: 936 SIG: 9

What could i be missing?
 

apty

Active Member
Licensed User
Longtime User
I thought it was possible to import the generated java code as android project in eclipse. I had created the layout in xml and was trying to find out if it is possible to run the project in eclipse. Which is the best way of doing it?
 
Upvote 0

apty

Active Member
Licensed User
Longtime User
I am trying to transfer a working b4a project to eclipse so that I may use the code outside b4a
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…