1. 2015 is going to be a great year for Android! Why wait??
    Samsung Galaxy Note 5 | Samsung Galaxy S6 | HTC One M9
  2. New Forum Created: Samsung Gear VR!

my first application crush


  1. unicorn6684

    unicorn6684 Member

    I build my first application and it's run fine on the emulator.
    I created an adk file and sent it to my phone via email.
    after installation I tried to run it and it immediately crushed.

    any ideas what to do?

    Advertisement
    :
  2. mills2533

    mills2533 Well-Known Member

    If you're using Eclipse to build your app, you can plug your phone into your computer in debug mode and run the app to get the logcat and determine the cause of the crash.
  3. unicorn6684

    unicorn6684 Member

    I tried that before I created the adk file.
    the eclipse not recognize my phone
    (the list still empty when my phone pluged in)
    I tried diffrent solutions, but finally gave up..
  4. mills2533

    mills2533 Well-Known Member

    That's typically an issue with the drivers for the phone. Do some google searches to find the drivers for your phone and your operating system. It is worthwhile to get that fixed so you have a real device to troubleshoot issues.
  5. jonbonazza

    jonbonazza Well-Known Member

    in the sdk manager, near the bottom, there is an item for Google USB drivers. make sure you have those installed. Also, make sure your phone has debugging enabled before connecting it to your computer.
  6. Kostas G

    Kostas G Active Member

    You can still see the error in your device using an application like CatLog.
  7. unicorn6684

    unicorn6684 Member

    1. to mills2533: I downloaded the first link from
    http://lge-phones.org/download-lg-optimus-one-p500-usb-driver.html
    and tried to launch my app after installing (while my devices pluged in).
    but the device chooser window was still empty (except my emulator)

    2. to jonbonazza: no effect

    3. to Kostas G: the catlog works perfectly
    I see an errror:
    "java.lang.RubtimeExceptaion: Unable to instantiate activity ComponentInfo{...}:
    java.lang.ClassNotFoundException: myapp.v1.MainActivity in loader dalvik.system.PathClassLoader[/data/app/myapp.v1-1.adk]
    "
    I got lots more rows, I think they are trace flow (start with "at")
    I got no clue how to read this and what to look for (this is my first app on mobile) please advise..
  8. Kostas G

    Kostas G Active Member

    How did you create your APK file? In your post you mention an ADK file. This is a typo, isn't it? Anyway, it seems that your APK file isn't created properly.
  9. unicorn6684

    unicorn6684 Member

    it's a typo, i meant apk.
    I created it with eclipse export wizard..
  10. Kostas G

    Kostas G Active Member

    What OS version is your device and what is the target SDK in your application? Make sure that you aren't building your application to rely in a higher OS version than the one that your device supports.

    Also, are you using any libraries in your application?
  11. jonbonazza

    jonbonazza Well-Known Member

    Also, what OS are you programming on?
  12. mills2533

    mills2533 Well-Known Member

    I'm assuming myapp.v1.MainActivity is in your AndroidManifest.xml file since you said the app works on the emulator. Are you using proguard to obfuscate your app?


    If you still want to get Eclipse's logcat working, try this.

    When you connect your phone, I would do it without the emulator open. Then after you connect it, go to the DDMS tab in Eclipse and see if you see your phone there and can transfer files back and forth. If you can do that, that means Eclipse is recognizing your phone. You'll want to execute the app on your phone since you said it is already installed there. Eclipse will keep a running logcat of the phone's activity as long as it is connected. If it isn't recognized on the DDMS tab, it is still most likely a driver issue with your computer's OS.
  13. unicorn6684

    unicorn6684 Member

    by saying the apk file created inpropery you gave me the idea that maby changing the package name might caused inner errors.
    so I started the project anew (save the old one in a diffrent name) and now it's working fine on my phone.
    although i didn't got to the same point as before, so I'll know for sure only in a few days..
    does anyone want me to post my conclusions in a few days?
    anyway, thanks everyone..
  14. jonbonazza

    jonbonazza Well-Known Member

    Go ahead and post the conclusion. It might be helpful to someone in the future. =)
  15. unicorn6684

    unicorn6684 Member

    conclusion: everything works fine.
    the problem was probably that I changed the package name.
    for future begginners: don't stay with the default package name,
    and don't try to change the package name after created..
Loading...

Share This Page