我正在使用凌空库在android中执行网络操作。因此,我试图将此库添加到在Android Studio和gradle系统中创建的项目中。
我在项目中添加了凌空库,但是当我与gradle同步时,我收到了错误消息。我尝试了所有在这里看到的答案,但没有任何帮助。
错误消息:在Android Studio中找不到名称为“ default”的配置
齐射/build.gradle
apply plugin: 'android-library'
android {
compileSdkVersion 19
buildToolsVersion '19.0.1'
sourceSets {
defaultConfig {
minSdkVersion 8
targetSdkVersion 19
}
main {
assets.srcDirs = ['assets']
res.srcDirs = ['res']
aidl.srcDirs = ['src']
resources.srcDirs = ['src']
renderscript.srcDirs = ['src']
java.srcDirs = ['src']
manifest.srcFile 'AndroidManifest.xml'
}
}
}
app / build.gradle
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion '19.0.1'
defaultConfig {
minSdkVersion 8
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:appcompat-v7:19.+'
compile project(':library:volley')
}
root / build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.1'
}
}
allprojects {
repositories {
mavenCentral()
}
}
settings.gradle
include ':app'
include ':library:volley'