gpt4 book ai didi

android - 不编译Svg image Loader的库文件

转载 作者:行者123 更新时间:2023-11-29 23:53:04 25 4
gpt4 key购买 nike

我在我的项目中编译了这个依赖:

compile 'com.github.ar-android:AndroidSvgLoader:1.0.1'

未正确同步并给出以下错误:

Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.github.ar-android:AndroidSvgLoader:1.0.1.

Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.github.ar-android:AndroidSvgLoader:1.0.1. Unable to resolve dependency for app@debugAndroidTest/compileClasspath': Could not resolve com.github.ar-android:AndroidSvgLoader:1.0.1.

Unable to resolve dependency for app@debugAndroidTest/compileClasspath&#3 Could not resolve com.github.ar-android:AndroidSvgLoader:1.0.1

我也写依赖

    allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io'; }
// but still not working....
}
}

Gradle 文件:

项目文件

buildscript {

repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.1'


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

allprojects {
repositories {
maven { url 'https://jitpack.io' }
jcenter()
google()
}
}

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

应用程序 Gradle 文件

     apply plugin: 'com.android.application'

android {
compileSdkVersion 26
defaultConfig {
applicationId "edru.techxpose.co.recycleviewdemo"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')

implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'


implementation 'com.github.ar-android:AndroidSvgLoader:1.0.1'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-
core:3.0.2'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.caverock:androidsvg:1.2.1'

implementation files('libs/svg-android-2.0.5.jar')
}

最佳答案

试试这段代码:

项目文件:

buildscript {

repositories {
maven { url 'https://jitpack.io' }
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'


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

allprojects {
repositories {
maven { url 'https://jitpack.io' }
jcenter()
google()
}
}

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

应用程序 Gradle 文件

     apply plugin: 'com.android.application'

android {
compileSdkVersion 26
defaultConfig {
applicationId "edru.techxpose.co.recycleviewdemo"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')

implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'


implementation 'com.github.ar-android:AndroidSvgLoader:1.0.1'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.caverock:androidsvg:1.2.1'
implementation files('libs/svg-android-2.0.5.jar')
}

关于android - 不编译Svg image Loader的库文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50694748/

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