Android Studio uses issue---import aidl

Source: Internet
Author: User

Used for a period of time Android studio found that slowly like to write code with it, the interface is much more beautiful than ADT, and I am more lazy, as the owner and VS2013 almost the reminder function is really good, haha this thing off the topic.

Recently encountered a problem: after switching to Android studio Aidl files can not follow the traditional ADT in the SRC directory to build a package to introduce files, so that the operation in the class can not find a class file.

A number of inquiries did not result, and finally found as the first import Eclipse Project has been import-summary.txt in the reminder (embarrassed ~

The folder changes after the project migration are as follows:

Android Gradle projects use a different directory structure than adteclipse projects. Here's how the projects were restructured:* androidmanifest.xml = app\src\main\androidmanifest.xml* assets\ = App \src\main\assets* Libs\xutils-2.5.5.jar = app\libs\xutils-2.5.5.jar* Proguard-android.txt = app\ proguard-android.txt* Proguard-project.txt = app\proguard-project.txt* res\ = app\src\main\res* src\ = app\ src\main\java* src\android\content\pm\ipackagedataobserver.aidl = app\src\main\aidl\android\content\pm\ ipackagedataobserver.aidl* src\android\content\pm\ipackagestatsobserver.aidl = app\src\main\aidl\android\ content\pm\ipackagestatsobserver.aidl* src\android\content\pm\packagestats.aidl = app\src\main\aidl\android\ content\pm\packagestats.aidl* src\android\telephony\neighboringcellinfo.aidl = app\src\main\aidl\android\ telephony\neighboringcellinfo.aidl* src\com\android\internal\telephony\itelephony.aidl = app\src\main\aidl\ Com\android\internal\tElephony\itelephony.aidl 

 introduce the Aidl file : You need to create the Aidl directory under App\src\main, and then the package name \ file name, as prompted. Aidl

Example:file path in ADT:

Src\android\content\pm\ipackagedataobserver.aidl

File paths in Android Studio:

App\src\main\aidl\android\content\pm\ipackagedataobserver.aidl

Finally, if you create an import based on my path aidl or an error can not find, only need clean project a bit better, as it is so pit, the last one did not think of the pit I long time embarrassed ~ ~

Android Studio uses issue---import aidl

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.