9 common errors and solutions in Android Development
After a variety of sorting and discussion with enthusiastic netizens, we finally sorted out the nine most common problems and solutions in Android development, and share them with you again!! If useful, please top the post and make common progress. Well, I won't say much. Here's a detailed explanation!
1. If the R file of your project is missing, you can try to change the version number and save it. The missing r file is generally caused by an error in the layout text
2. The layout file cannot have capital letters
3. Throw the following error warning: application does not specify an API level requirement!,
Because the users SDK is not specified, modify the androidmanifest.xml file
Add: < uses SDK Android: minsdkversion = "8 ″ > < / uses SDK >##
4. The bottleneck of machine memory. When APK is greater than our machine memory, the simulator ruthlessly throws it out
The first one (only APK is smaller than the machine memory, and the current APK has been installed, but it cannot be debugged again)
Start the simulator and enter the menu
Second (general)
5. When starting the Android simulator, if the prompt: failed to install on device 'emulator-5554': timeout
This may be caused by the card. The solution: Eclipse - > window - > Preferences - > Android - > DDMS - > ADB connection time out (MS). Set this time longer. The default is 5 seconds, that is, 5000 Ms. I change it to 10 seconds. So you don't have to restart the simulator every time. The specific time setting depends on the actual environment##
6. During the development process, it is often reported when APK is installed on the simulator
Activitymanager: error: activity class {..} does not exist. Here are two solutions: check whether there is a '.' before the name of the main activity in the androidmanifest.xml file##
7 this error occurred while running eclipse
8 the following error occurred: no permission to write SD card java.io.filenotfoundexception: / MNT / sdcard / update.zip (permission denied)
Solution: write the following permissions to the resource file
Solution: (1) under CMD, enter the command line, CD it to platform tools under SDK, execute the command: after the package name of ADB uninstall application is successful, re run it, such as e: \ Android \ Android SDK windows \ platform Tools > ADB uninstall com.wtt success (2) uninstall the application with the same name as the application installed on the mobile phone.