您的位置:首页 > 移动开发 > Android开发

AndroidStudio使用本地aar包

2015-07-09 15:02 555 查看
在主工程中,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>
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: