Workarounds for Android Project not working

Source: Internet
Author: User
Tags android sdk manager

Is there a problem with the file itself?

There are two ways to judge: 1, the more efficient way is to use the decompression software to open or unzip the process of any error prompts, If there is an error, then re-download the file (javaapk with the compression tool is winrar4.0, if you use the other decompression software if there is an error can change winrar4.0 above try). 2. In the javaapk download the file name of many are for example: 577c49d8e2ef077ec662e4310701821b.rar This form, the front of the 577c49d8e2ef077ec662e4310701821b is the MD5 of the package, you can Baidu a MD5 Check the tool to see if the MD5 is the same as the file name.

What IDE is used

If you are sure that the downloaded package is not a problem then see if it is not the same as the compile tool, javaapk testing is done with Android Developer tools Build: v22.6.2-1085508 (If you do not know how to see the version of the IDE, please Baidu), theoretically adt22.6 the above version can be normal import of the project site. adt22.6 The following is not guaranteed, but you can import several projects to try to test is not all error, if all the error, it may be an IDE problem. If you use Android Studio or other tools, please fix the file import problem yourself

Project Import is correct

The correct step is: Open eclipse--> Click file--Select-->import--> click on Android Existing android...--> Click Browse to find your project--and finally click "Finish", finish (emphasize that your project must not be placed in the first eclipse-generated workspace directory, or the import will not succeed ...) ) Graphic Tutorial See here

SDK compiled version

Many friends of ADT is on Google's official website or on the internet to find a casual, Google's official website of ADT only with a latest version of the SDK, the lower version of the SDK also need to be downloaded through ADT's own Android SDK Manager. If you don't know which version of the SDK your ADT includes, you can click on the menu on your ADT: window-preferences-android (Chinese Version: Window-Preferences-android) to see which SDKs are available in your environment, This site used to test the source of the SDK often used version: 2.3.7, 4.2.2, 4.4.2, the old source is mostly used 2.3.7 test, Xinyuan code 4.4.2 mostly. If your SDK does not include 4.4.2 or 4.2.2 can go to this site to find the two versions of the SDK download down, how to use the download down the SDK This site is explained, here do not delve into.

Project Coding Issues

Another problem is to determine whether the project code is correct, if you import the source code on the source name has a red fork, point that with a Red Fork folder icon found a name called Src folder icon also has a red fork, in order to open the folder or file with a red fork, Double-click the wrong Java file, in the Code edit window point to the right of the small red Square can quickly navigate to the wrong line of code, see if this line of code is mixed with garbled, then you in your project name right click on the last menu preferences (Chinese version: Preferences) (or click on the project name and press the shortcut key Alt+enter effect), in the pop-up window nothing dot on the right to find the text file encoding (Chinese version: Text files encoding) This item, tick other (Chinese version: Other), If the GBK is displayed, then replace it with UTF-8 if it is UTF-8, then switch to GBK (most commonly used in mainland China is these two codes), click OK. Items will automatically refresh after a few seconds, see if the Red Fork is not gone, if it exists, then select the project Point menu inside the Project->clean...->clean projects selected below (Chinese version: Project--Clean- > Clean up the items selected below) and then tick the item name to clean up the cache. The project cache is forced to be cleaned.

Is there a lack of dependencies

Some of the larger projects mostly include sub-projects or use of third-party library files, you can right-click on your project name to select the last menu preferences (the Chinese version of the name is preferred) (or click on the project name and press the shortcut key Alt+enter effect), On the left side of the Android menu, there will be two small windows on the right, one for project build Target and one for the library. See if there is a red fork in the library there are words put the mouse on the path above the 2 seconds do not move will show the path full name, roughly remember the name, and then point Add,eclipse will automatically list the library you imported, to see if there is a name similar to the name you just remember the point, Double-click will be added, and then remove the error can be removed, but most of the situation is the dot add out of the pop-up box Nothing, this time you have to find a way to rely on the library, Javaapk.com released the source if the library will be packaged together. If it is found in other areas of the project source, the library estimate is not good to find.

If the jar package is missing

Many projects use some third-party jar packages, but the author uses the jar package may not be placed under the project directory, resulting in the packaging of the time did not go in, others imported the project will go to the source path to find the jar package, but the importer's computer this path must not have this jar package, You can right click on your project name to choose the last menu preferences (Chinese Version: Preferences) (or click the project name and then press the shortcut key Alt+enter effect), point to the left of the Java Build Path Menu (Chinese version: Java build path) a window with four tabs will appear on the right, point libraries (Chinese version: library) window to see if there is a red fork, Red Fork Point Add jars Point open you are solving the problem of this project, then point Libs directory, See if there is a jar package with the same name, double-click the selection if you have one, and then select the jar bag with the Red fork to remove. If you do not have to find a way to make this jar, my practice is to put the jar name in Baidu inside search, see if you can find the same file name files, and then put in the project's Libs directory and then follow the method quoted above, if you can not find that self-blessing. Click OK. Items will automatically refresh after a few seconds, see if the Red Fork is not gone, if it exists, then select the project Point menu inside the Project->clean...->clean projects selected below (Chinese version: Project--Clean- > Clean up the items selected below) and then tick the item name to clean up the cache. The project cache is forced to be cleaned.

Workarounds for Android Project not working

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.