Nine Android errors and quick solutions

Source: Internet
Author: User

After various sorting and discussion with enthusiastic netizens, I finally sorted out the most common problems and solutions in nine android development types and shared them with you again !! If it is useful, stick to the post and make progress together. I will not talk about it anymore. The following is a detailed explanation!

1. If the R file of your project is missingYou can try to save the version number. The R file is usually caused by layout text errors.

2. The layout file cannot contain uppercase letters.

3. the following error is thrown: Application does not specify an API level requirement!,

Because the users sdk is not specified, modify the AndroidManifest. xml file.

Add: <uses-sdkandroid: minSdkVersion = "8"> </uses-sdk> ##

4. machine memory bottleneck. When apk is larger than our machine memory, the simulator will throw

Installation error: INSTALLFAILEDINSUFFICIENT_STORAGE Please check logcat output for more details. Launch canceled!

This makes debugging impossible. Now we can solve this problem in two ways.

First(Only the apk is smaller than the machine memory and has been installed with the current apk, but it cannot be debugged again)

Start the simulator and enter the menu
Settings-> applications-> mange
Applications-> select the application-> select "unistall ".
In this way, the apk can be completely deleted and re-installed.

Second(General)
-Partition-size 128

In Eclipse, add Options in the project Target. ##

5. When the android simulator is started, the following error occurs: Failed to install on device 'emulator-100': timeout.

This is possible because of the card cause startup timeout, solution: eclipse-> window-> Preferences-> Android-> DDMS-> ADB connection time out (MS ). set the time to a longer value. The default value is 5 seconds, that is, 5000 ms. if I change it to 10 seconds, it will be OK.
In this way, you do not need to restart the simulator every time. Specific time setting based on actual environment requirements ##

6. During the development process, when the apk is installed on the simulator, an error is reported.

ActivityManager: Error: Activity class {...} does not exist.
There are two solutions to this problem:
In the AndroidManifest. xml file, check whether the main Activity name contains the '.' character ##

7. This error occurs when you run Eclipse.

No Launcher activity found!
The launch will only sync the application package on the device!

Solution
Add in AndroidManifest. xml
<Category android: name = "android. intent. category. LAUNCHER"/> ##

8 the following error occurs: java. io. FileNotFoundException:/mnt/sdcard/update.zip (Permission denied)

Solution: Write the following permissions to resource files:

<Uses-permissionandroid: name = "android. permission. WRITEEXTERNALSTORAGE"/> ##

9. When Re-installation failed due to different application signatures occurs during running.

Solution
1)Cmd, go to the command line, cd to platform-tools under the SDK, and execute the command: adb uninstall package name of the application
After the result is success, you can run it again.
E: \ android-sdk-windows \ platform-tools> adb uninstall com. wtt
Success
2)Uninstall the app with the same name as the app installed on your phone.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.