Bu yüzden Android Studio v0.2'de Gradle v1.6 ile çok basit bir proje kurmaya çalışıyorum. ActionBarSherlock kullanan basit bir uygulama oluşturmak istiyorum, bu yüzden Android Studio'da bir Proje oluşturdum.
Proje oluşturulurken aynı kök klasörde, en son ABS'yi indirdim. Yani buradaAndroid Studio'da ActionBarSherlock için uygun şekilde nasıl kurulabilir?
benim yapısı:, nihayet,
apply plugin: 'android-library'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
dependencies {
compile 'com.google.android:support-v4:r7'
}
android {
compileSdkVersion 14
buildToolsVersion '17'
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
}
}
Ve: actionbarsherlock/build.gradle
yılında
include ':ABSApp'
include 'actionbarsherlock'
project(':actionbarsherlock').projectDir=new File('actionbarsherlock')
Ben: root settings.gradle
yılında
|ABSAppProject
|..settings.gradle
|..build.gradle
|--ABSApp
|....build.gradle
|actionbarsherlock
|..build.gradle
, var ABSApp/build.gradle
, Ben:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
}
dependencies {
compile 'com.android.support:support-v4:r7'
compile project (':actionbarsherlock')
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 9
targetSdkVersion 16
}
}
Kök yapı.gradesi boş. oluştururken
, (gradle inşa --info kullanarak) alıyorum:
Starting Build
Settings evaluated using settings file '/Users/m/Documents/Projects/ABSAppProject/settings.gradle'.
Projects loaded. Root project using build file '/Users/ma/Documents/Projects/ABSAppProject/build.gradle'.
Included projects: [root project 'ABSAppProject', project ':ABSApp', project ':actionbarsherlock']
Evaluating root project 'ABSAppProject' using build file '/Users/m/Documents/Projects/ABSAppProject/build.gradle'.
Evaluating project ':ABSApp' using build file '/Users/m/Documents/Projects/ABSAppProject/ABSApp/build.gradle'.
Evaluating project ':actionbarsherlock' using empty build file.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':ABSApp'.
> Failed to notify project evaluation listener.
> Configuration with name 'default' not found.
o gradle.build dosya muhtemelen Tamam bu yüzden, Gradle Tamam çalışmak gibi kullanarak tek başına ABS kütüphane oluşturma.
Neyi yanlış yapıyorum?
Bunu daha önce çözdünüz mü? Bende bununla sorun yaşıyorum .. – Rob