AndroidStudio使用本地aar包

来源:互联网 发布:知乎 旅游带什么 编辑:程序博客网 时间:2024/05/21 01:30

在主工程中,AndroidStudio菜单栏File->New Module->Phone and Tablet Application->Import .JAR or .AAR Package,

然后将circleimageview.aar加入即可。

在主工程中的build.gradle中加入需要编译的工程(红色部分的代码)

apply plugin: 'com.android.application'android {    compileSdkVersion 22    buildToolsVersion "21.1.2"    defaultConfig {        applicationId "sa.robot.me.androidtest"        minSdkVersion 14        targetSdkVersion 22        versionCode 1        versionName "1.0"    }    buildTypes {        release {            minifyEnabled false            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'        }    }}dependencies {    compile fileTree(dir: 'libs', include: ['*.jar'])    compile 'com.android.support:appcompat-v7:21.0.3'    <span style="color:#ff6666;">compile project(':circleimageview')</span>}


0 0
原创粉丝点击