• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps problem running heavy application

chris2a

Lurker
I developed an "heavy" application (700 Mb !). With an "apk installer" application, i can install it on the Nexus One SD card (Froyo "installLocation" option). My application is heavy because of the videos it contains (located in /raw directory). The problem I have, is that it crashes when launched, with this error :

Code:
08-18 11:22:16.179: ERROR/AndroidRuntime(1250): FATAL EXCEPTION: main
08-18 11:22:16.179: ERROR/AndroidRuntime(1250): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.test.media/com.test.media.Welcome}: java.lang.ClassNotFoundException: com.test.media.Welcome in loader dalvik.system.PathClassLoader[/mnt/asec/com.test.media-1/pkg.apk]
08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at android.app.ActivityThread.access$2300(ActivityThread.java:125)
08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at android.os.Handler.dispatchMessage(Handler.java:99)
08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at android.os.Looper.loop(Looper.java:123)
08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at android.app.ActivityThread.main(ActivityThread.java:4627)
08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at java.lang.reflect.Method.invokeNative(Native Method)
08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at java.lang.reflect.Method.invoke(Method.java:521)
08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at dalvik.system.NativeStart.main(Native Method)
08-18 11:22:16.179: ERROR/AndroidRuntime(1250): Caused by: java.lang.ClassNotFoundException: com.test.media.Welcome in loader dalvik.system.PathClassLoader[/mnt/asec/com.test.media-1/pkg.apk]
08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     ... 11 more
I dont't understand the reason of this error, because when i try the same thing with a lighter application (250 Mb) it runs perfectly. Has anyone of you ever had this kind of problem ? Do you know if there is a size limit for applications to work ?

Thank you for your help !
 
That's odd... It's giving a ClassNotFoundExeption which, obvilously, means taht it cannot find a class that is listed in the manifest. Does the class listed as the main class in the manifest exist? Is it preceded by a '.'?
 
Yes the application is in the manifest with a . before...
When I try the same code but with a lighter video, the application works !
 
Yes the application is in the manifest with a . before...
When I try the same code but with a lighter video, the application works !

Yea, that's why I thought it was odd... Unfortunately I am really not sure what the problem is. As far as I know (Although i could be wrong), there is no limitation on file size. With that said, it's best if you host those files on a web server somewhere and download them on first launch to save application space. No one will want to download a 700mb file.

EDIT: wait a minute... There is your answer... The apk is 700mb... How much internal memory does your phone have?

EDIT EDIT: Nvm, you said you are installing on SD card... Hmm... I am sorry, but I am at a loss... lol
 
Yeah don't know the answer, but host the video's on a webserver and download them on first start, just warn your user its 699 meg of a download ;-)
 
Also it is better to check to make sure the files don't already exist before you download. That way you don't go redownloading the files every time you start the app.
 
Back
Top Bottom