Summary of methods for Android studio to introduce Aidl files
Android studio introduces Aidl files. Generally speaking, there are two methods
The first method
Directly create a new Aidl folder in Src / main directory and put our Aidl file in this directory. Because the default Aidl file configuration of Android studio is like this.
The second method is to copy the Adil file to the LIBS folder and configure it in the build.gradle file
Finally, let's share an example:
Folder changes after project migration are as follows:
Import Aidl file: as mentioned in the prompt, you need to create an Aidl directory under app \ SRC \ main, followed by package name \ file name. Aidl
Example: file path in ADT:
src\android\content\pm\IPackageDataObserver.aidl
File path in Android Studio:
app\src\main\aidl\android\content\pm\IPackageDataObserver.aidl
Finally, if you create and import Aidl according to my path and still report an error and can't find it, you just need to clean project. As is like this. I didn't expect it for a long time~~