Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/226.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 未编译Svg图像加载程序的库文件_Android_Svg_Android Gradle Plugin - Fatal编程技术网

Android 未编译Svg图像加载程序的库文件

Android 未编译Svg图像加载程序的库文件,android,svg,android-gradle-plugin,Android,Svg,Android Gradle Plugin,我在我的项目中编译此依赖关系: compile 'com.github.ar-android:AndroidSvgLoader:1.0.1' 未正确同步,并给出以下错误: 无法解析“”的依赖项:app@debug/compileClasspath:无法 不解析com.github.ar android:AndroidSvgLoader:1.0.1 无法解析的依赖项 ':app@debug/compileClasspath':无法解析 arandroid:AndroidSvgLoader:1.0

我在我的项目中编译此依赖关系:

compile 'com.github.ar-android:AndroidSvgLoader:1.0.1'
未正确同步,并给出以下错误:

无法解析“”的依赖项:app@debug/compileClasspath:无法 不解析com.github.ar android:AndroidSvgLoader:1.0.1

无法解析的依赖项 ':app@debug/compileClasspath':无法解析 arandroid:AndroidSvgLoader:1.0.1。无法解决 依赖app@debugAndroidTest/compileClasspath':无法 解析com.github.ar android:AndroidSvgLoader:1.0.1

无法解析的依赖项 app@debugAndroidTest/无法解析compileClasspath arandroid: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
  }
应用程序渐变文件

     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')
  }
     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
}
应用程序渐变文件

     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')
  }
     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')
  }

请正确设置问题格式。不起作用。仍然面临相同的问题issue@HarwinderSingh请复制粘贴2个grandle文件,以便我们可以帮助您。@HarwinderSingh请尝试此代码并再次同步项目,如果您看到相同的错误,请尝试文件->使缓存无效/重新启动。告诉我是不是work@HarwinderSingh如果可能的话,请举手。非常感谢。祝你今天愉快。我还有一个问题。请把它修好