gpt4 book ai didi

android - 无法解决依赖关系 :app@debug/compileClasspath': Could not resolve io. anyline:anylinesdk:5

转载 作者:行者123 更新时间:2023-11-29 22:40:30 37 4
gpt4 key购买 nike

我正在开发一个由某人创建的 android 项目。在我的 Android studio 中打开这个项目后,它给出了一个错误:

ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve io.anyline:anylinesdk:5.

ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve io.anyline:anylinesdk:5.

//Build.gradle of my project
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'
android {
compileSdkVersion project.ext.compile_sdk_version
defaultConfig {
applicationId "com.xyz"
minSdkVersion 23
targetSdkVersion 26
versionCode 5
versionName "1.0.4"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
ndk {
abiFilters 'armeabi-v7a'
}
multiDexEnabled true
}
sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/TrainedModels'] } }
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

}
}


compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
}
repositories {
flatDir {
dirs 'libs'
}
maven {
url 'https://anylinesdk.blob.core.windows.net/maven/'
}
mavenCentral()
}


dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
implementation "com.android.support:support-v4:$support_version"
implementation "com.android.support:appcompat-v7:$support_version"
implementation "com.android.support:design:$support_version"
implementation "com.android.support:cardview-v7:$support_version"
implementation "com.android.support:preference-v14:$support_version"
implementation 'com.github.bumptech.glide:glide:3.8.0'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.0.2'
implementation 'com.squareup.okhttp3:logging-interceptor:3.4.1'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation "com.squareup.retrofit2:adapter-rxjava2:2.3.0"
androidTestImplementation 'com.android.support.test:runner:1.0.2'

implementation 'io.anyline:anylinesdk:5@aar'

implementation 'org.greenrobot:eventbus:3.1.1'

implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.googlecode.libphonenumber:libphonenumber:7.2.2'
//
implementation ('com.google.android.gms:play-services-base:11.6.0'){
force=true
}
implementation ('com.google.android.gms:play-services-auth-api-phone:11.6.0'){
force=true
}
//Optional for phone number hint
implementation ('com.google.android.gms:play-services-auth:11.6.0'){
force=true
}
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

}
repositories {
mavenCentral()
}

Images of Error

谁能帮帮我。

最佳答案

这里的问题是anyline sdk集成

在build.gradle的依赖中添加Anyline SDK

repositories {
//add the anyline maven repo
maven { url 'https://anylinesdk.blob.core.windows.net/maven/'}
}

dependencies {
//add the anyline sdk as dependency (maybe adapt version name)
compile 'io.anyline:anylinesdk:3.6.1@aar'
//... your other dependencies
}

或者通过 aar 的本地副本

将.aar复制到项目的libs目录(app/libs)并适配build.gradle。

在build.gradle的依赖中添加Anyline SDK

//root section of the file
repositories {
flatDir {
dirs 'libs'
}
}

dependencies {
compile(name:'anylinesdk-3.6.1', ext:'aar')
//... your other dependencies
}

希望这会解决......

关于android - 无法解决依赖关系 :app@debug/compileClasspath': Could not resolve io. anyline:anylinesdk:5,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59047696/

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