Ledbelly2142
Aspiring developer
Profile
Posts: 80
Reg: Aug 04, 2012
Reno
6,750
09/11/12 07:55 PM (13 years ago)

Using the AVD and unexpected crashes testing an app

How much should I care about AVD crashes in testing an app? I get the error "Sorry! The application (the app Im working on) (process com.myapp) has stopped unexpectedly. Please try again." Now my app is called something else (not com.myapp). Should I use a real android device to test? Crashes like this seem random, not on any specific screen or function.. I have not used the AVD a great deal, but it sure seems like the AVD in Eclipse is pretty sketchy. -Led
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
09/11/12 08:30 PM (13 years ago)
I have tested many of my apps on AVD's and from that i can safely tell you that android emulators are really good for testing apps since they mock all the functions of the real device. Now a days i use an android device to test my apps just because the app uploads faster on device than an emulator. Have you checked the logcat output to see what error it is showing? Whenever the app crashes there can be various reasons for that and logcat helps to figure out what actually is causing that crash. Changing the package name really does not matter but i recommend you use default name for the project and also clean the project before hitting run on the emulator button. Cleaning project helps to clean the project files by removing unnecessary codes.
 
Ledbelly2142
Aspiring developer
Profile
Posts: 80
Reg: Aug 04, 2012
Reno
6,750
like
09/11/12 08:48 PM (13 years ago)
Sandeep, thank you for the advice. What do you mean by "cleaning project"? There is much I don't yet know, I appreciate your advice. Thank you, -Led
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
09/11/12 09:06 PM (13 years ago)
Cleaning project removes the .class files and recompiles the project. Basically, it forces a rebuild of the entire project. You can find this option on the upper side of the eclipse. To clean project you have to click the Project---> Clean---> select the project you want to clean.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
09/11/12 09:43 PM (13 years ago)
You should also be watching what's going on in LogCat so you can see why it crashes. Sometimes it's because of a Splash Screen transition, sometimes because of a background color...the reason's vary, and some are more important than others. If you're not sure how to add the LogCat view to Eclipse, here's a tutorial video I whipped up: http://www.youtube.com/watch?v=ckpjn7x_Eas In general though, for both iOS and Android, it's always better to test on a real device. Simulators and Emulators are just that, and don't replace the real thing. Mark
 
Ledbelly2142
Aspiring developer
Profile
Posts: 80
Reg: Aug 04, 2012
Reno
6,750
like
09/12/12 07:53 AM (13 years ago)
I have been watching what is going on in LogCat, the crashing reasons do not seem consistent. I will look closer. Sandeep, Thanks for the Clean Project advice. Mark, thanks for the youtube link. -Led
 
Ledbelly2142
Aspiring developer
Profile
Posts: 80
Reg: Aug 04, 2012
Reno
6,750
like
09/14/12 03:52 PM (13 years ago)
Ok, finally got some time to work on my app. I tried to clean the app with Eclipse and got this error: [2012-09-14 15:33:48 - com.HappenMake.BT_activity_root] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties. I cant find "Android Tools" or "Fix Project Properties" I did a google search and found a link that explained: 2 options: 1. right-click on your project and select "Android Tools -> Fix Project Properties" (if this din't work, try second option) 2. right-click on your project and select "Properties -> Java Compiler", check "Enable project specific settings" and select 1.5 or 1.6 from "Compiler compliance settings" select box. The first option worked. So I cleaned the project again, seemed to work without the error. -Led
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
09/14/12 03:54 PM (13 years ago)
Hey Led, Check this doc out for common issues and their solutions: https://www.buzztouch.com/files/howtos/Common_Android_Errors_and_Solutions_v1.0.pdf Mark
 
Ledbelly2142
Aspiring developer
Profile
Posts: 80
Reg: Aug 04, 2012
Reno
6,750
like
09/14/12 08:00 PM (13 years ago)
Mark, Thanks! Lots of times, ya just don't know until ya know... or more apt, ya just don't know until ya understand. I truly appreciate all the advice, it is a huge part of what makes BuzzTouch so valuable. You guys are awesome! Thank you, Sincerely -Led
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.