Eclipse import framework app error, eclipseapp
An error occurred while importing apps in packages from Android source code.
After the source code is downloaded, the app module in the linux compiling framework will not make any mistakes, but there will be many errors when it is loaded into eclipse.
The SDK provided by Google to users is a castrated version that cannot use hidden APIs. If you want to use system APIs such as import android. OS. AsyncResult;
First, you need to download the source code, and then compile. After compilation
Copy classer. jar to most of the system APIs in the libs folder of eclipse in out/target/common/obj/JAVA_LIBRARIES/framework_intermediates.
However, some APIs such as com. android. internal. telephony. Phone may be stored elsewhere.
Find the dependency telephony-common in the. mk file in the app directory.
LOCAL_PATH: = $ (call my-dir) include $ (CLEAR_VARS) LOCAL_MODULE_TAGS: = optionalLOCAL_SRC_FILES :=$ (call all-java-files-under, src) LOCAL_PACKAGE_NAME: = DeviceInfo <span style = "color: # ff6666;"> LOCAL_JAVA_LIBRARIES + = telephony-common </span> LOCAL_CERTIFICATE: = platforminclude $ (BUILD_PACKAGE)
Or use the shell command to search for Phone. class to find the place where this api is called and find the corresponding jar package.
Under the telephony-common-intermediates directory of JAVA_LIBRARIES
Find all the required classes. jar and put it in the libs of the project.