Bugs and workarounds for all Android developers

Source: Internet
Author: User

we know that as developers need to have a wealth of expertise, but also to have a rigorous thinking, we develop in the development of such errors or that, through the Clip Ding Academy online learning android Knowledge, I listed 9 common Android Development Errors and workarounds:

1. If your project's R file is missing, you can try to change the version number in the Save, R file is not generally the layout 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!,

Modify the Androidmanifest.xml file because the Users SDK is not specified.

Join: <uses-sdkandroid:minsdkversion= "8″></uses-sdk> # #

4. Machine memory bottleneck, when APK is larger than our machine memory, the simulator mercilessly throws

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

Let's not debug, now we have to cure this problem, there are two ways to solve

First (APK is less than machine memory, and the current apk is installed, just can't debug again)

Start the emulator and go to the menu

Settings->applications->mange

Applications-> Select the Application->select "Unistall".

This will remove it completely, and then reinstall the APK will be no problem.

Second (general)

-partition-size 128

Eclipse is added in the options for the project target. ##

5. When you start the Android emulator, if prompted: Failed to install on device ' emulator-5554′: timeout

This is possible because of a card that causes a startup time-out, Solution: ADB---DDMS-----Preferences, Windows---------------- A long time set, the default is 5 seconds is 5000ms, I changed to 10 seconds is OK.

This will not have to restart the simulator every time. Specific time settings according to the actual environment need # #

6. During the development process, it is often reported when the APK is installed on the simulator

ActivityManager:Error:Activity class {..} does not exist.

Such errors, here are summed up two ways to solve:

See if there are '. ' Before the name of the main activity in the Androidmanifest.xml file. Character # #

7 This error occurred while running eclipse

No Launcher Activity found!

The launch would only sync the application package on the device!

Solutions

Add in Androidmanifest.xml

<category android:name= "Android.intent.category.LAUNCHER"/> # #

8 The following error occurred and no SD card permissions were written Java.io.FileNotFoundException:/mnt/sdcard/update.zip (Permission denied)

Workaround, the resource file writes the following permissions

<uses-permissionandroid:name= "Android.permission.WRITEEXTERNALSTORAGE"/> # #

9. When the runtime appears re-installation failed due to different application signatures.

Solutions

(1) CMD, enter command line, CD to Platform-tools under SDK, execute command: ADB Uninstall application package name

After the results are success, re-run it.

such as e:\android\android-sdk-windows\platform-tools> adb uninstall COM.WTT

Success

(2) Uninstall the app already installed on the phone and the program with the same name.

As a developer of Android, I recommend a more professional IT learning website-------------------to help friends who need to learn.

Bugs and workarounds for all Android developers

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.