Errors and solutions for all Android Developers

Source: Internet
Author: User

Errors and solutions for all Android Developers

We know that as developers, we need to have a wealth of professional knowledge and rigorous thinking. We will encounter one or more errors during development. By learning about Android online at the Ding Emy, I listed nine common Android development errors and solutions:

1. If the R file of your project is missing, you 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.

Join: ##

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 on 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

##

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

Solution: Write the following permissions to resource files:

##

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

Solution

(1) Under cmd, go to the command line, cd to platform-tools under SDK, and execute the command: adb uninstall package name of the application

After the result is success, you can run it again.

E: androidandroid-sdk-windowsplatform-tools> adb uninstall com. wtt

Success

(2) uninstall the app with the same name as the app installed on your mobile phone.

As an Android developer, I would like to recommend a professional IT learning website- Ding, hoping to help those who need to learn.

 

Related Article

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.