gpt4 book ai didi

android - 添加依赖出错

转载 作者:太空宇宙 更新时间:2023-11-03 13:49:14 24 4
gpt4 key购买 nike

我正在尝试添加

 compile 'com.applozic.communication.uiwidget:mobicomkitui:3.38'

在 build.gradle 中的依赖项下,但它给出了以下错误 Here is the whole logcat

我已经添加了

include 'com.applozic.communication.uiwidget:mobicomkitui:3.38'

在 settings.gradle 中。

请帮忙,我是新手。我尝试实现我的项目的链接是 here这是 build.gradle(module:app)

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
packagingOptions{

exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/ECLIPSE_.SF'
exclude 'META-INF/ECLIPSE_.RSA'


}

defaultConfig {
applicationId "com.urjapawar.bevyphase1"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0'
compile 'com.applozic.communication.uiwidget:mobicomkitui:3.38'

}

这里是 build.gradle(module:project)

buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
mavenCentral()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

这是清理项目后的日志

Error:A problem occurred configuring project ':app'.

Could not resolve all dependencies for configuration ':app:_debugCompile'. Could not find com.applozic.communication.uiwidget:mobicomkitui:3.38. Searched in the following locations: https://repo1.maven.org/maven2/com/applozic/communication/uiwidget/mobicomkitui/3.38/mobicomkitui-3.38.pom https://repo1.maven.org/maven2/com/applozic/communication/uiwidget/mobicomkitui/3.38/mobicomkitui-3.38.jar file:/C:/Users/DELL/AppData/Local/Android/sdk/extras/android/m2repository/com/applozic/communication/uiwidget/mobicomkitui/3.38/mobicomkitui-3.38.pom file:/C:/Users/DELL/AppData/Local/Android/sdk/extras/android/m2repository/com/applozic/communication/uiwidget/mobicomkitui/3.38/mobicomkitui-3.38.jar file:/C:/Users/DELL/AppData/Local/Android/sdk/extras/google/m2repository/com/applozic/communication/uiwidget/mobicomkitui/3.38/mobicomkitui-3.38.pom file:/C:/Users/DELL/AppData/Local/Android/sdk/extras/google/m2repository/com/applozic/communication/uiwidget/mobicomkitui/3.38/mobicomkitui-3.38.jar Required by: BevyPhase1:app:unspecified

最佳答案

转到项目的 build.gradle 文件,并添加 jcenter()

 buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.1'
//classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
// classpath 'com.github.dcendents:android-maven-plugin:1.2'
classpath 'com.novoda:bintray-release:0.3.4'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
jcenter()
}
}

来源: https://github.com/AppLozic/Applozic-Android-SDK/blob/master/build.gradle

关于android - 添加依赖出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37248312/

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