- File --> New... --> New Module --> import .JAR or .AAR package, choose the specific aar file
- Add dependency
File--> project structure ---> choose app(or other module use the lib)--> dependancies
Add the imported module
Or edit build.gradle directly:
dependencies {
compile project(':resourceHosting' )
compile project(':iotivity-armeabi-v7a-base-debug' )
} - Sync gradle & build
# Import aar -2
http://blog.csdn.net/qiujuer/article/details/39754517
NOTE: 這個方法在import多個aar時會出錯
如果兩個aar都有包多個.so檔,package的時候只會包到其中一個aar的.so檔
# Import eclipse project
- File-->New... --> Import Library... --> Choose the eclipse project folder
- Choose all option, press Finish
- Edit AndroidManifest.xml to remove wrong
properties
(Remove all properties with error)
- Edit build.gradle of the imported module
Change apply plugin: 'com.android.application'
to apply plugin: 'com.android.library' - Edit build.gradle remove other wrong fields, like applicationId
- Add dependency as described above
- Sync gradle & build



沒有留言:
張貼留言