Turn: [Android Quiz] development environment issue highlights

Source: Internet
Author: User

工欲善其事, its prerequisite.

Compared to iOS development, there are more versions of the Android development environment, and there are many problems with it. Obviously, we should not waste valuable time in solving the problems brought about by the development environment, this article summarizes the common development environment problems and solutions, for everyone to inquire and add at any time.

Debug Certificate Expired

The certificate file generated by the Android SDK for debugging Debug.keystore is valid for 365 days and will be reported by the console after more than one year of use.

Error generating final archive:debug Certificate expired on 10/09/18 16:30

The workaround is to manually delete the Debug.keystore files, which are located under the "C:\Documents and settings\username\.android" directory under the Windows system, located under the Linux and Mac systems "~/.android/ Directory The next time you launch the app, eclipse will automatically create a new Debug.keystore file. It is best to "Project->clean" the project to trigger the compiler to recompile.

Failed to install APK on Device:timeout

The exact cause of this problem is unclear and may be due to improper shutdown of the ADB connection.

Failed to install helloworld.apk on device ' emulator-5554 ': timeout

Solution 1: Replace the computer USB port ( do not use the front USB port) or re-install the mobile phone drive, the hand machine after the boot.

Solution 2: Select "WINDOW->PREFERENCES->ANDROID->DDMS->ADB connection Time Out" in Eclipse and change the default 5000ms to a larger value. For example, 20000ms.

Workaround 3: In the Command Line window, enter the following command in turn:

ADB kill-serveradb Start-server
Invalid command-line parameter

This is due to the inability of the eclipse development environment to find the required executable files.

[2011-07-10 07:10:22-demo] Android launch! [2011-07-10 07:10:24-demo] adb is running normally. [2011-07-10 07:10:24-demo]  Performing com.demo.DemoActivity activity launch[2011-07-10 07:10:25-demo] Automatic Target mode:launching new Emulator With compatible AVD ' xxx ' [2011-07-10 07:10:25-demo] launching a new emulator with Virtual Device ' xxx ' [2011-07-10 07:11 : 06-emulator] Invalid command-line parameter:files\android\android-sdk\tools/emulator-arm.exe.

The workaround is to select the "window->preferences->android" option in Eclipse and check if the path to the "SDK location" contains spaces, if "C:\Program files\android" This is changed to "c:\progra~1\android" so that the command line can be called normally.

Tip: Enter the "dir/x" command in the Command Line window to list the 8.3 format file names, and see the following results:

2012-09-25  23:52    <DIR>          watchd~1     watchdata2012-09-01  11:01    <DIR>                       winamp2012-07-24  22:22    <DIR>          window~4     Windows live2012-07-24  22:21    <DIR>          wi3957~1     Windows Live SkyDrive
Install_failed_insufficient_storage

This error is reported when you encounter insufficient storage capacity when installing the application:

Installation error:install_failed_insufficient_storageplease check Logcat output for more details. Launch canceled!

If you are running an app on the emulator, you can expand the AVD's memory capacity.

If you are running on a real machine, you can modify the installation preferences in Androidmanifest.xml to allow the app to be installed directly on the SD card.

<manifest xmlns:android= "http://schemas.android.com/apk/res/android"    package= "Com.example     " android:installlocation= "Preferexternal" >...</manifest>
Unable to open sync connection

Although many people encounter this problem, the root cause of the problem is not accurate, there may be many reasons for the ADB error:

[2010-10-12 09:36:48-myapp] Android launch! [2010-10-12 09:36:48-myapp] adb is running normally. [2010-10-12 09:36:48-myapp] Performing com.mycompany.myapp.MyActivity activity launch[2010-10-12 09:36:48-myapp] Automatic Target mode:using Devic E ' xxx ' [2010-10-12 09:36:48-myapp] uploading myapp.apk onto device ' xxx ' [2010-10-12 09:36:48-myapp] Failed to upload m yapp.apk on device ' xxx ' [2010-10-12 09:36:48-myapp] java.io.IOException:Unable to open sync connection! [2010-10-12 09:36:48-myapp] Launch canceled!

Workaround 1: Unplug the phone cable and reconnect it;

Solution 2: Turn off the debug option on your phone and then reopen it in the development->usb debug app, Settings----on your phone.

Too Many open files

This problem with the system can open the number of files at the same time setting, but generally do not need to modify the relevant settings, with a problem (unable to open sync Connection) method can be resolved.

Third-party jar package, Noclassdeffounderror

This problem occurs after upgrading the ADT version: All normal Android projects, the class in all third-party jar packages After the upgrade prompt noclassdeffounderror.

The reason may be the difference between compiled ant scripts used by different versions of ADT, there are two possible workarounds:

Method 1: Right-click on your Android project in Eclipse, select "Properties->java Build path->order and Export" here to tick the checkboxes in front of all third party jar packages.

Method 2: Check if your third-party jar files are placed in the "Libs" directory under the project directory, if not, change them.

Failed to allocate Memory:8

In general, there is a problem with the AVD setup, it is likely that the RAM value is set too high to lower the test. In the early ADT version, there was a bug in which the RAM value must contain "MB", such as "512MB" instead of "512", otherwise the above error message is indicated.

It has also been mentioned that the resolution is one of the reasons, but I have not actually encountered, if only to change the small RAM does not solve the problem, try to turn down the resolution also look.

Resources

"Debug Certificate Expired" error in Eclipse Android plugins

Android error:failed to install *.apk on device *: timeout

The Android emulator is not starting, showing "invalid command-line parameter"

Solution:android install_failed_insufficient_storage Error

Android ADB "Unable to open sync connection!"

Com.android.ddmlib.SyncException:Too Many open files

Noclassdeffounderror-eclipse and Android

Android Emulator failed to allocate memory 8

Turn: [Android Quiz] development environment issue highlights

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.