Issues encountered by eclipse

Source: Internet
Author: User


    • Can not reference R file, it may be the guide is wrong cannot be resolved or was not a field: first check whether your XML is saved, and then check your import imported R file is your package name +r or ANDROID.R
R file is missing: If you determine the configuration file, the code is error-free case, please

Build automatically, Project-I tick

R files are not generated because of errors that cause them,

Files under the Android Resource folder cannot have uppercase characters and will cause R.java to fail to generate

When making a diagram, the name of the image will often be mixed with the name of the case is good to remember, these images copied to the Drawable directory, if the call in the XML file will likely cause the R.java file cannot be generated.

 
    • Error opening trace file:no such file or directory (2)
The version of the Android API is inconsistent with the version of the emulator
Delete<uses-sdk android:minsdkversion= "8" android:targetsdkversion= "/> "
Add<uses-permission android:name= "Android.permission.WRITE_EXTERNAL_STORAGE"/>     
I read the server also this problem has been solved by this method


    • Still no compatible AVDs with Target ' Google APIs '

When compiling the program with the new version of Android, I found an error message: Still no compatible AVDs with Target ' Google APIs '

The AVD is Android virtual device, which is an Android platform that is a dummy appliance. When you start compiling your Android program, you must have a matching virtual device in order to render the Android runtime interface.

To create an AVD, first open the command line tool cmd and go to the tools directory of the Android SDK. Enter the following command:

[Java]View Plaincopy
    1. Android list targets

The output will show the currently available AVD device ID (the actual output is related to your environment):

[Java]View Plaincopy
  1. ID: 1
  2. Name: Android 1.1
  3. Type:platform
  4. API Level: 2
  5. SKINS:HVGA (default ), hvga-l, Hvga-p, Qvga-l, qvga-p
  6. id:< Span style= "margin:0px; padding:0px; Border:currentcolor; Color:rgb (192, 0, 0); Background-color:inherit; "class=" number ">2
  7. name:android 1.5
  8. Type: Platform
  9. API level: 3
  10. SKINS:HVGA (default), Hvga-l, Hvga-p, qvga-l, Qvga-p

Enter the following command to create a virtual device:

  1. Android Create AVD--name <your_avd_name>--target <targetID>
  2. For example:
  3. Android Create AVD--name my_avd--target 2

Compile the program again to run.

    • Signature Error

The solution is as follows:

In Eclipse Open the Windows menu under the Properties tab, under Lint Error checking on the left Android below will run full Error check to exporting app before the tick is removed

change the name of the project in English and Chinese can not be signed, how to do?

The software name and project name don't matter. The name of the project essentially determines the folder to be stored. The software name should be changed in Androidmanifest.xml.

<application
android:icon= "@drawable/ic_launcher"
android:label= "@string/app_name" >
The Android:label property here is the software name, the content is placed in the/res/valus/string.xml.

Java.lang.ClassNotFoundException

ClassNotFoundException is a class that does not find an exception.

In your question it is mainactivity that this class cannot find.

    1. Your mainefest.xml file is not registered mainactivity this class

    2. You have registered a mainactivity class in your mainefest.xml, but your src does not write this class.

      I changed the package name, but I didn't change it in the manifest file.

    • The simulator won't start.

Nand:could not write file c:\users\admini~1\appdata\local\temp\\androidemulator\tmpa81b.

Find c:\users\admini~1\appdata\local\temp\androidemulator\tmpa81b.tmp This file and delete it.

The C:\users\admini~1\appdata\local\temp\androidemulator directory is a system-generated garbage file that can be deleted after each run.

Jar mismatch! Fix your dependencies

When developing an Android project, it is sometimes necessary to refer to multiple projects as a library. When referencing a project, there are sometimes "Jar mismatch! Fix your dependencies "error.

This is because the jar package (Android-support-v4.jar) for two items is inconsistent.

The workaround is to remove all 2 jars and then add the latest jar packages to each one.



 

From for notes (Wiz)

Issues encountered by eclipse

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.