我無法讓我的gradle這個正確構建後,我導入ParseUI,Android的GitHub庫進口ParseUI,Android的GitHub庫到Android Studio中
- 我會克隆,回購協議下局部
- 我更新子模塊(運行git子模塊更新--init --recursive而在ParseUI,Android的本地回購)
- 我把回購到我的項目(在同一級別的應用程序)
這是我收到的錯誤: 錯誤:錯誤:行(4)項目與路徑':facebook-sdk:facebook'無法在項目中找到':ParseUI-Android:ParseLoginUI'。
項目結構:
TestingOutBeta
---app
---libs (I put the general Parse jar file in here and it works fine)
---build.gradle
---ParseUI-Android
---facebook-sdk
---build.gradle
---build.gradle
---build.gradle
---settings.gradle
在我最頂層的build.gradle我:
//Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
在我的頂層settings.gradle我:
include ':app', ":ParseUI-Android:ParseLoginUI", ":ParseUI-Android:facebook-sdk:facebook"
在
我應用程序級別build.gradle我有:
apply plugin: 'com.android.application'
android {
compileSdkVersion 20
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.example.sammyxer.testingoutbeta"
minSdkVersion 15
targetSdkVersion 20
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:20.0.0'
compile project(":ParseUI-Android:ParseLoginUI")
}
在我ParseUI-的Android級的build.gradle我:
repositories {
mavenCentral()
}
// 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.12.2'
}
}
ext {
compileSdkVersion = 19
buildToolsVersion = "19.1.0"
minSdkVersion = 8
targetSdkVersion = 19
}
任何提示或幫助將是巨大的!謝謝大家
我想你需要導入一些lib在那裏..右鍵點擊項目 - >去屬性 - > Android - >看到有任何lib導入十字標記? – KOTIOS 2014-09-04 04:17:00