1) Error 1c/c++ problem
Problem
Descriptiondescription Resource Path Location Type
Make.exe: * * * [obj/local/armeabi-v7a/libtest.so] Error 1c/c++ problem
Solve
Unable to locate the relevant error message through Eclipse, so enter the project's JNI directory, execute the ndk-build instruction, and print out detailed error details. The root cause is an interface that does not implement a pure virtual function
2) Type Jint could not being resolved
Reason
NDK header File not imported
Reason
When the Android project opens the. cpp file editing, the Java compiler is also automatically called to compile the current code, so the Java compiler will certainly not compile C + + code properly, causing the problem
Solve
When compiling the project, the current eclipse editing interface cannot be a. C or. cpp file and must be a. java or. h file. The operation is as follows, switch to the. java file, and then delete all the error messages, so that it can be compiled smoothly, in fact, the JNI module is called Ndk-build to compile the
3) cannot be resolved or was not a field
Problem
Descriptionresourcepathlocationtype
Bt_mycity cannot be resolved or was not a Fieldchangecityactivity.java
Reason
The variable is not defined in the layout file XML. Double-click the error, and then jump to the error page, press CTRL, the mouse click on the variable found unable to jump to the variable definition of the layout file, normally if there is a definition, can jump normally
Solve
Add the definition of the variable in the layout file. If the layout page is not actually used, you can simply delete the error, tell the compiler to ignore the error, and compile without interfering with the normal installation
Attention
Ignore error message, crash may occur when jumping to this page
4) Unable to resolve target ' android-23 '
Errors in compiling the project are as follows:
Description Resource Path Location Type
The project was not built since it BuildPath is incomplete. Cannot find the class file for Java.lang.Object. Fix Thebuild Path then try building this project
Description Resource Path Location Type
Unable to resolve target ' android-23 ' Unknown android target problem
Description Resource Path Location Type
Error:no Resource Identifier found Forattribute ' letterspacing ' in the package ' Android '
Reason
The target device is Android 6.0, you need to use an API of 23, view the Android option in Project properties, view the current version of only Android 4.4.2 API 19, so you need to update the SDK
5) The role of APPCOMPAT_V7 and compilation errors
Phenomenon:
ADT Environment Version v22.6.2-1085508, when you create a project, you create a appcompat_v7, if you create multiple
New projects, there will also appear appcompat_v7_1, and so on, increments.
Reason:
APPCOMPAT_V7 is a Compatibility Pack for Google, a support library that allows more than 2.1 of the Android SDK to use the 4.0 version of the interface. In layman's terms, the Android version of your mobile SDK is 2.1, and by adding this library (which will be packaged into the APK), you can display the 4.0 version of the awesome image.
Problem:
The following error occurred creating a new project:
The container ' Android Dependencies ' references non existing library \appcompat_v7_5\bin
\appcompat_v7_5.jar '
Solution:
Click Project, select Clean, select Clean all project, select the new project created individually. It can then be compiled and run.
Of course, if the target device is more than 4.0 version, completely without AppCompat, you can create the project directly when the minimum Required SDK version is selected above 4.0, will not create appcompat this package.
Reference: http://jingyan.baidu.com/article/3ea51489e04eb852e61bbaa4.html
Android Fifth lesson compilation error Analysis