gpt4 book ai didi

android - 找不到 com.parse.bolts :bolts-android:1. 1.2。在手机差距项目(android studio)中?

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:50:13 27 4
gpt4 key购买 nike

我是 phone gap 的新手。在我的项目中集成了 facebook 插件。运行后显示错误

`Error:A problem occurred configuring root project 'android'.'

Could not resolve all dependencies for configuration ':_debugCompile'. Could not find com.parse.bolts:bolts-android:1.1.2. Searched in the following locations: file:/C:/Users//AppData/Local/Android/sdk/extras/android/m2repository/com/parse/bolts/bolts-android/1.1.2/bolts-android-1.1.2.pom file:/C:/Users//AppData/Local/Android/sdk/extras/android/m2repository/com/parse/bolts/bolts-android/1.1.2/bolts-android-1.1.2.jar file:/C:/Users//AppData/Local/Android/sdk/extras/google/m2repository/com/parse/bolts/bolts-android/1.1.2/bolts-android-1.1.2.pom file:/C:/Users//AppData/Local/Android/sdk/extras/google/m2repository/com/parse/bolts/bolts-android/1.1.2/bolts-android-1.1.2.jar Required by: :android:unspecified > com.facebook.android:FacebookLib:3.21.1

请帮助我。

import java.util.regex.Pattern

apply plugin: 'android'

buildscript {
repositories {
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
compile 'com.parse.bolts:bolts-android:1.1.2'


}
}

ext.multiarch=false

dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
for (subproject in getProjectList()) {
compile project(subproject)
}
compile files('com.phonegap.plugins.facebookconnect/FacebookLib/libs/bolts-android-1.1.2.jar')
}

android {
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}

defaultConfig {
versionCode Integer.parseInt("" + getVersionCodeFromManifest() + "0")
}

compileSdkVersion 19
buildToolsVersion "19.1.0"

if (multiarch || System.env.BUILD_MULTIPLE_APKS) {
productFlavors {
armv7 {
versionCode defaultConfig.versionCode + 2
ndk {
abiFilters "armeabi-v7a", ""
}
}
x86 {
versionCode defaultConfig.versionCode + 4
ndk {
abiFilters "x86", ""
}
}
all {
ndk {
abiFilters "all", ""
}
}
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}

}

task wrapper(type: Wrapper) {
gradleVersion = '1.12'
}

def getVersionCodeFromManifest() {
def manifestFile = file(android.sourceSets.main.manifest.srcFile)
def pattern = Pattern.compile("versionCode=\"(\\d+)\"")
def matcher = pattern.matcher(manifestFile.getText())
matcher.find()
return Integer.parseInt(matcher.group(1))
}

def getProjectList() {
def manifestFile = file("project.properties")
def pattern = Pattern.compile("android.library.reference.(\\d+)\\s*=\\s*(.*)")
def matcher = pattern.matcher(manifestFile.getText())
def projects = []
while (matcher.find()) {
projects.add(":" + matcher.group(2).replace("/",":"))
}
return projects
}

最佳答案

尝试一下可能会有帮助。

解析失败:compile 'com.parse.bolts:bolts-android:1.+'

转到菜单: 文件 -> 设置 -> 构建、执行、部署 -> 构建工具 -> Gradle

在 - 项目级设置

勾选或选择- User default gradle wrapper(推荐)

在 - 全局 Gradle 设置中

禁用离线工作

关于android - 找不到 com.parse.bolts :bolts-android:1. 1.2。在手机差距项目(android studio)中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27763865/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com