Go Back   Android Forums > Android Development > Application Development
Application Development Dev lounge for our application developers.

Get excited for the Samsung Galaxy S5! Find everything you need and discuss it in our Galaxy S5 Forum!

test: Reply
 
LinkBack Thread Tools
Old September 19th, 2012, 10:03 AM   #1 (permalink)
New Member
Thread Author (OP)
 
Join Date: Sep 2012
Posts: 6
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default my first application crush

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?

unicorn6684 is offline  
Reply With Quote
sponsored links
Old September 19th, 2012, 10:58 AM   #2 (permalink)
Member
 
Join Date: Dec 2010
Location: Colorado (USA)
Posts: 150
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 21 Times in 21 Posts
Default

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.
mills2533 is offline  
Reply With Quote
Old September 19th, 2012, 01:20 PM   #3 (permalink)
New Member
Thread Author (OP)
 
Join Date: Sep 2012
Posts: 6
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default eclipse don't recognize my phone

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..
unicorn6684 is offline  
Reply With Quote
Old September 19th, 2012, 02:02 PM   #4 (permalink)
Member
 
Join Date: Dec 2010
Location: Colorado (USA)
Posts: 150
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 21 Times in 21 Posts
Default

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.
mills2533 is offline  
Reply With Quote
Old September 19th, 2012, 05:35 PM   #5 (permalink)
Senior Member
 
jonbonazza's Avatar
 
Join Date: Jul 2010
Gender: Male
Posts: 1,936
 
Device(s): Nexus 4, Samsung Galaxy S II, HTC Evo 4G, Amazon Kindle Fire
Carrier: ATT

Thanks: 235
Thanked 478 Times in 292 Posts
Default

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.
jonbonazza is offline  
Reply With Quote
Old September 20th, 2012, 03:02 AM   #6 (permalink)
Junior Member
 
Join Date: Aug 2012
Location: Athens, Greece
Posts: 42
 
Device(s):
Carrier: Not Provided

Thanks: 6
Thanked 7 Times in 7 Posts
Default

You can still see the error in your device using an application like CatLog.
Kostas G is offline  
Reply With Quote
Old September 21st, 2012, 02:26 AM   #7 (permalink)
New Member
Thread Author (OP)
 
Join Date: Sep 2012
Posts: 6
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

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..
unicorn6684 is offline  
Reply With Quote
Old September 21st, 2012, 02:43 AM   #8 (permalink)
Junior Member
 
Join Date: Aug 2012
Location: Athens, Greece
Posts: 42
 
Device(s):
Carrier: Not Provided

Thanks: 6
Thanked 7 Times in 7 Posts
Default

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.
Kostas G is offline  
Reply With Quote
Old September 21st, 2012, 02:54 AM   #9 (permalink)
New Member
Thread Author (OP)
 
Join Date: Sep 2012
Posts: 6
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

it's a typo, i meant apk.
I created it with eclipse export wizard..
unicorn6684 is offline  
Reply With Quote
Old September 21st, 2012, 03:00 AM   #10 (permalink)
Junior Member
 
Join Date: Aug 2012
Location: Athens, Greece
Posts: 42
 
Device(s):
Carrier: Not Provided

Thanks: 6
Thanked 7 Times in 7 Posts
Default

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?
Kostas G is offline  
Reply With Quote
sponsored links
Old September 21st, 2012, 08:41 AM   #11 (permalink)
Senior Member
 
jonbonazza's Avatar
 
Join Date: Jul 2010
Gender: Male
Posts: 1,936
 
Device(s): Nexus 4, Samsung Galaxy S II, HTC Evo 4G, Amazon Kindle Fire
Carrier: ATT

Thanks: 235
Thanked 478 Times in 292 Posts
Default

Also, what OS are you programming on?
jonbonazza is offline  
Reply With Quote
Old September 21st, 2012, 11:32 AM   #12 (permalink)
Member
 
Join Date: Dec 2010
Location: Colorado (USA)
Posts: 150
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 21 Times in 21 Posts
Default

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.
mills2533 is offline  
Reply With Quote
Old September 22nd, 2012, 11:43 PM   #13 (permalink)
New Member
Thread Author (OP)
 
Join Date: Sep 2012
Posts: 6
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default Solved it

Quote:
Originally Posted by Kostas G View Post
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.
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..
unicorn6684 is offline  
Reply With Quote
Old September 24th, 2012, 11:41 AM   #14 (permalink)
Senior Member
 
jonbonazza's Avatar
 
Join Date: Jul 2010
Gender: Male
Posts: 1,936
 
Device(s): Nexus 4, Samsung Galaxy S II, HTC Evo 4G, Amazon Kindle Fire
Carrier: ATT

Thanks: 235
Thanked 478 Times in 292 Posts
Default

Quote:
Originally Posted by unicorn6684 View Post
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..
Go ahead and post the conclusion. It might be helpful to someone in the future. =)
jonbonazza is offline  
Reply With Quote
Old September 24th, 2012, 01:14 PM   #15 (permalink)
New Member
Thread Author (OP)
 
Join Date: Sep 2012
Posts: 6
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

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..
unicorn6684 is offline  
Reply With Quote
Reply


Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 08:40 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.