java.lang.RuntimeException: Unable to instantiate activity

Scantech

Well-Known Member
Licensed User
Longtime User
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{Scantech.CarGaugeLite/Scantech.CarGaugeLite.main}: java.lang.ClassNotFoundException: Scantech.CarGaugeLite.main in loader dalvik.system.PathClassLoader[/mnt/asec/Scantech.CarGaugeLite-1/pkg.apk]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1569)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Scantech.CarGaugeLite.main in loader dalvik.system.PathClassLoader[/mnt/asec/Scantech.CarGaugeLite-1/pkg.apk]
at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)


Any idea what this is all about. Thanks.
 

Scantech

Well-Known Member
Licensed User
Longtime User
DALVIK THREADS:
(mutexes: tll=0 tsl=0 tscl=0 ghl=0 hwl=0 hwll=0)
"main" prio=5 tid=1 SUSPENDED
| group="main" sCount=1 dsCount=0 obj=0x40037180 self=0xd090
| sysTid=29605 nice=0 sched=0/0 cgrp=default handle=-1345004896
at android.view.Surface.lockCanvasNative(Native Method)
at android.view.Surface.lockCanvas(Surface.java:354)
at android.view.ViewRoot.draw(ViewRoot.java:1473)
at android.view.ViewRoot.performTraversals(ViewRoot.java:1275)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1876)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3728)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
at dalvik.system.NativeStart.main(Native Method)

"Thread-11" daemon prio=5 tid=10 WAIT
| group="main" sCount=1 dsCount=0 obj=0x405e5310 self=0x26e790
| sysTid=29637 nice=0 sched=0/0 cgrp=default handle=2029648
at java.lang.Object.wait(Native Method)
- waiting on <0x405e5450> (a java.lang.VMThread)
at java.lang.Thread.parkFor(Thread.java:1424)
at java.lang.LangAccessImpl.parkFor(LangAccessImpl.java:48)
at sun.misc.Unsafe.park(Unsafe.java:337)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2016)
at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:322)
at anywheresoftware.b4a.randomaccessfile.AsyncStreams$AOUT.run(AsyncStreams.java:230)
at java.lang.Thread.run(Thread.java:1019)

"Thread-10" daemon prio=5 tid=9 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x405e4b00 self=0x1ef8d8
| sysTid=29636 nice=0 sched=0/0 cgrp=default handle=2036480
at android.bluetooth.BluetoothSocket.readNative(Native Method)
at android.bluetooth.BluetoothSocket.read(BluetoothSocket.java:325)
at android.bluetooth.BluetoothInputStream.read(BluetoothInputStream.java:96)
at java.io.InputStream.read(InputStream.java:157)
at anywheresoftware.b4a.randomaccessfile.AsyncStreams$AIN.run(AsyncStreams.java:141)
at java.lang.Thread.run(Thread.java:1019)

"Binder Thread #2" prio=5 tid=7 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x4052a5d0 self=0x1b1528
| sysTid=29611 nice=0 sched=0/0 cgrp=default handle=1467816
at dalvik.system.NativeStart.run(Native Method)

"Binder Thread #1" prio=5 tid=6 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x4052a508 self=0x166308
| sysTid=29610 nice=0 sched=0/0 cgrp=default handle=1985752
at dalvik.system.NativeStart.run(Native Method)

"Compiler" daemon prio=5 tid=5 VMWAIT
| group="system" sCount=1 dsCount=0 obj=0x405265b0 self=0x169cb8
| sysTid=29609 nice=0 sched=0/0 cgrp=default handle=1880784
at dalvik.system.NativeStart.run(Native Method)

"Signal Catcher" daemon prio=5 tid=4 RUNNABLE
| group="system" sCount=0 dsCount=0 obj=0x405264f0 self=0x180b90
| sysTid=29608 nice=0 sched=0/0 cgrp=default handle=1561504
at dalvik.system.NativeStart.run(Native Method)

"GC" daemon prio=5 tid=3 VMWAIT
| group="system" sCount=1 dsCount=0 obj=0x40526448 self=0x1d45f0
| sysTid=29607 nice=0 sched=0/0 cgrp=default handle=1918384
at dalvik.system.NativeStart.run(Native Method)

"HeapWorker" daemon prio=5 tid=2 VMWAIT
| group="system" sCount=1 dsCount=0 obj=0x40526390 self=0x186990
| sysTid=29606 nice=0 sched=0/0 cgrp=default handle=1918184
at dalvik.system.NativeStart.run(Native Method)

Another one on a different app. :confused:
 
Upvote 0

Scantech

Well-Known Member
Licensed User
Longtime User
Both Error Reports are uploaded to the market. I cannot duplicate this error. The first Error has been reported on 2 of my apps.
 
Upvote 0

Scantech

Well-Known Member
Licensed User
Longtime User
What are the devs doing with this option "Installing to external drive". Do you prefer to use external drive option? If I decided on the next update with that option unchecked. Will it affect any of the users?

Thanks Erel. You have always been very helpful.
 
Upvote 0

MichaelSRoss

New Member
Licensed User
Longtime User
I had the same problem after changing the package name (I think). The program compiled ok but crashed on the actual device before showing any of the activity forms. I deleted the "Objects" sub-folder and recompiled. The first iteration threw an exception complaining that it couldn't create a directory, the second worked and fixed the problem.

There were a few anxious moments as the clues produced by the machine and/or looking through the unfiltered log were not very clear (at least to me).
 
Upvote 0
Top