Developing Android applications on Linux with Eclipse sometimes can get really ugly. Sadly neither NetBeans which has a really nice Android plugin, but cannot execute a single test nor IDEA can rescue me or make me switching😦 but probably they wouldn’t rescue me due to problems of Android development kit itself – I’m not sure.
Update: Have a look at my solution
So, I’ve collected some of the most common problems I encountered while developing an Android app and how to ‘solve’ them:
- Problem: Eclipse says ‘Your project contains error(s), please fix it before running it.’ and you cannot find a problem.
1. Open the problem tab. fix the described errors.
2. Make sure that you included all necessary jars in your build path
3. Sometimes even this can help: rm ~/.android/debug.keystore
- Problem: you cannot debug your application
1. check if debuggable = true in application tag of manifest xml
2. if that does not help or if you are getting “Can’t bind to local 8601 for debugger” in the Console tab then read this and make sure you use only the line
in your hosts file. if not, change the file and restart adb (see below)
- Problem: Error “AdbCommandRejectedException: device not found”
Solution: restart adb (see below)
- Problem: you cannot select one test case to execute
Solution: run the whole (android) juni test or a package and then select via right click to debug one single test
If nothing seems to help then try one or all of the following steps:
1. restart device
2. restart eclipse
3. restart adb: sudo adb kill-server; sudo adb start-server
Please add your problems and solutions in the comments😉