1. Are you ready for the Galaxy S20? Here is everything we know so far!

problem running heavy application

Discussion in 'Android Development' started by chris2a, Aug 18, 2010.

  1. chris2a

    chris2a Lurker
    Thread Starter

    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 !
     


  2. jonbonazza

    jonbonazza Android Expert

    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 Lurker
    Thread Starter

    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 Android Expert

    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

    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 Android Expert

    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 Android Expert

    If you need somewhere to host them, I will host the files for a one-time, negotiable fee.
     
Loading...
Similar Threads - problem running heavy
  1. Axelmorgana
    Replies:
    0
    Views:
    80
  2. varamilc
    Replies:
    7
    Views:
    374
  3. varamilc
    Replies:
    7
    Views:
    543
  4. PDX_Dragon
    Replies:
    0
    Views:
    380
  5. jtrevor0470
    Replies:
    4
    Views:
    424
  6. shlomitu
    Replies:
    1
    Views:
    219
  7. ElnurMM
    Replies:
    6
    Views:
    8,094
  8. Krishakrishii
    Replies:
    0
    Views:
    5,270
  9. Krishakrishii
    Replies:
    0
    Views:
    861
  10. Mordecai
    Replies:
    3
    Views:
    2,065

Share This Page

Loading...