Eclipse import framework app error, eclipseapp

Source: Internet
Author: User

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.

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.