【发布时间】:2014-09-04 04:15:38
【问题描述】:
导入 ParseUI-Android github 存储库后,我无法正确构建我的 gradle
- 我将 repo 克隆到本地
- 我更新了子模块(在 ParseUI-Android 本地 repo 中运行 git submodule update --init --recursive)
- 我将 repo 放入我的项目中(与应用程序处于同一级别)
这是我收到的错误: Error:Error:line (4)Project with path ':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
}
任何提示或帮助都会很棒!谢谢大家
【问题讨论】:
-
我猜你需要在那里导入一些库..右键单击项目-->转到属性-->Android-->看到有没有带十字标记的库导入?
标签: android git github android-studio parse-platform