Android .so .aar..jar文件的使用方式
一、這三種文件的使用
1,*.jar:拷貝到:libs目錄
dependencies {
??? compile fileTree(include: ['*.jar'], dir: 'libs')
}
第一種方法:然后打開(kāi)工程所在Project Structure,選擇Dependencies,點(diǎn)擊加號(hào)選擇File Dependency,然后在Libs文件夾選擇要導(dǎo)入的jar包。
第二種方法:右鍵jar包選擇add as library,然后選擇model就可以了?????????????????????????????????????????????????????????????????????????????????????????????????????????? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ???? 2,aar文件為: ”bestvike.aar“
第一步:拷貝到:libs目錄
第二步:build.gradle 配置文件中更改為
repositories {
??? flatDir {
??????? dirs 'libs'
??? }
}
dependencies {
??? compile(name:'bestvike', ext:'aar')
}
3,.so文件
?? 第一步,在src/main/目錄下新建jniLibs目錄
?? 第二步,放入.so的文件或文件夾
總結(jié)
以上是生活随笔為你收集整理的Android .so .aar..jar文件的使用方式的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: ios--成员变量与属性的区别
- 下一篇: android .so文件详解以及兼容