problem running heavy application


Last Updated:

  1. chris2a

    chris2a New Member This Topic's Starter

    Joined:
    Aug 18, 2010
    Messages:
    2
    Likes Received:
    0
    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 (Text):
    1. 08-18 11:22:16.179: ERROR/AndroidRuntime(1250): FATAL EXCEPTION: main
    2. 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]
    3. 08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
    4. 08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
    5. 08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at android.app.ActivityThread.access$2300(ActivityThread.java:125)
    6. 08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
    7. 08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at android.os.Handler.dispatchMessage(Handler.java:99)
    8. 08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at android.os.Looper.loop(Looper.java:123)
    9. 08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at android.app.ActivityThread.main(ActivityThread.java:4627)
    10. 08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at java.lang.reflect.Method.invokeNative(Native Method)
    11. 08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at java.lang.reflect.Method.invoke(Method.java:521)
    12. 08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
    13. 08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
    14. 08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at dalvik.system.NativeStart.main(Native Method)
    15. 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]
    16. 08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
    17. 08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
    18. 08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
    19. 08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
    20. 08-18 11:22:16.179: ERROR/AndroidRuntime(1250):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
    21. 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 !
     

    Advertisement
  2. jonbonazza

    jonbonazza Well-Known Member

    Joined:
    Jul 13, 2010
    Messages:
    1,934
    Likes Received:
    458
    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 '.'?
     
  3. chris2a

    chris2a New Member This Topic's Starter

    Joined:
    Aug 18, 2010
    Messages:
    2
    Likes Received:
    0
    Yes the application is in the manifest with a . before...
    When I try the same code but with a lighter video, the application works !
     
  4. jonbonazza

    jonbonazza Well-Known Member

    Joined:
    Jul 13, 2010
    Messages:
    1,934
    Likes Received:
    458
    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
     
  5. blundell

    blundell Well-Known Member

    Joined:
    Apr 23, 2010
    Messages:
    125
    Likes Received:
    17
    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 ;-)
     
  6. jonbonazza

    jonbonazza Well-Known Member

    Joined:
    Jul 13, 2010
    Messages:
    1,934
    Likes Received:
    458
    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.
     
  7. jonbonazza

    jonbonazza Well-Known Member

    Joined:
    Jul 13, 2010
    Messages:
    1,934
    Likes Received:
    458
    If you need somewhere to host them, I will host the files for a one-time, negotiable fee.
     

Share This Page

Loading...