我的android项目不包含build.gradle来放置useLibrary 'org.apache.http.legacy'
答案 0 :(得分:0)
示例Build.gradle
apply plugin: 'com.android.application'
android {
useLibrary 'org.apache.http.legacy'
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.Sample.App"
minSdkVersion 14
targetSdkVersion 25
versionCode 1
versionName "1.1"
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
debuggable false
jniDebuggable false
renderscriptDebuggable false
}
debug {
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
debuggable true
jniDebuggable true
renderscriptDebuggable true
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:design:25.1.0'
}