After a variety of finishing, as well as and enthusiastic netizen discussion, finally sorted out nine kinds of Android development of the most common problems and solutions to share with you again!! Useful words, please top posts, common progress. Well, no more said, the following is detailed!
1. If your project's R file is not available, you can try to change the version number in the Save, R file is not generally the layout of the text error caused.
2. Layout files may not have uppercase letters
3. Throw the following error warning:application does not specify a API level requirement!,
is to modify the Androidmanifest.xml file because the Users SDK is not specified.
Add: <uses-sdkandroid:minsdkversion= "8″></uses-sdk> #
4. Machine memory bottleneck, when the APK is larger than our machine memory, the simulator mercilessly throw
Copy Code code as follows:
Installation error:installfailedinsufficient_storage Please check logcat output for more details. Launch canceled!
Let's not debug, now we're going to fix this problem, there are two ways
The first (apk is less than the machine memory, and the current apk is installed, but cannot be debug again)
Start the simulator, and then go to the menu
Copy Code code as follows:
Settings->applications->mange
Applications-> Select the Application->select "Unistall".
So that you can completely remove it, and then reinstall the APK, no problem.
Second (general)
Copy Code code as follows:
Added in eclipse in the options for project target. ##
5. When starting the Android simulator if prompted: Failed to install on device ' emulator-5554′: timeout
This is possible due to a boot timeout caused by the card: Eclipse-> window-> Preferences-> Android-> DDMS-> ADB Connection Time Out (MS). Put this A long time set, the default is 5 seconds that 5000ms, I changed to 10 seconds on OK.
So you don't have to reboot the simulator every time. Specific time settings according to the actual environment needs #
6. In the process of development, often in the installation of APK to the simulator will be reported
ActivityManager:Error:Activity class {.} does not exist.
Such a mistake, here summed up two ways to solve:
Do you have '. ' Before viewing the name of the main activity in the Androidmanifest.xml file? Character # #
7 This error occurred while running eclipse
Copy Code code as follows:
No Launcher Activity found!
The launch would only be sync the application package on the device!
Solutions
Add in Androidmanifest.xml
Copy Code code as follows:
<category android:name= "Android.intent.category.LAUNCHER"/> #
8 The following error is not written to the SD card permissions java.io.FileNotFoundException:/mnt/sdcard/update.zip (Permission denied)
Workaround, the resource file is written with the following permissions
Copy Code code as follows:
<uses-permissionandroid:name= "Android.permission.WRITEEXTERNALSTORAGE"/> #
9. When the runtime appears re-installation failed due to different application signatures.
Solutions
(1) CMD, enter the command line, CD to the SDK under the Platform-tools, execute the command: ADB uninstall application package name
After the results are success, it's okay to run again.
such as e:\android\android-sdk-windows\platform-tools> adb uninstall COM.WTT
Success
(2) Uninstall off the phone has been installed and the application of the same name of the program can be.