【问题标题】:android Error:(44, 13) Failed to resolve com.esri.arcgis.android:arcgis-android:10.2.7android 错误:(44, 13) 无法解析 com.esri.arcgis.android:arcgis-android:10.2.7
【发布时间】:2016-09-03 04:02:42
【问题描述】:

每次我构建我的 android 项目时,它都会给我这个错误

android Error:(44, 13) Failed to resolve com.esri.arcgis.android:arcgis-android:10.2.7

谁能帮我解决这个问题?

【问题讨论】:

    标签: android sdk maps arcgis esri


    【解决方案1】:

    问题就这样解决了 1.

    添加以下行

     // Add the following ArcGIS repository
            maven {
                url 'https://esri.bintray.com/arcgis'
            }
    

    在项目模块的build.gradle中

    变成那样

    // Top-level build file where you can add configuration options common to all sub-projects/modules.
    
    
    buildscript {
        repositories {
            jcenter()
    
            //**Added .. for ArcGIS
            maven {
                url 'https://esri.bintray.com/arcgis'
            }
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:2.1.0'
    
            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
    }
    
    allprojects {
        repositories {
            jcenter()
            // Add the following ArcGIS repository
            maven {
                url 'https://esri.bintray.com/arcgis'
            }
        }
    }
    
    task clean(type: Delete) {
        delete rootProject.buildDir
    }
    

    另外,我在 app 模块 build.gradle 中将 arcgis 依赖的版本编辑成这样

    compile 'com.esri.arcgis.android:arcgis-android:10.2.8'
    

    【讨论】:

    • buildscript 下的附加 maven url 帮助我解决了我的问题!
    【解决方案2】:

    可能需要。

    在应用程序模块 build.gradle 文件的依赖项块中,添加指令以将 ArcGIS Runtime SDK for Android 依赖项包含到您的应用程序中。 应用模块 build.gradle 文件

    Fallow all the steps from here

    dependencies {
        // Add ArcGIS Runtime SDK for Android dependency
        compile 'com.esri.arcgis.android:arcgis-android:10.2.7'
    }
    

    【讨论】:

    • 已经完成...这就是为什么我有上述错误!无法解析此行
    【解决方案3】:

    这可能是由于 Android Studio 的版本不匹配造成的。因此,请尝试在应用级别 build.gradle 中提供最新的依赖项。就我而言,我将其从 10.2.6 更改为 10.2.8

    compile 'com.esri.arcgis.android:arcgis-android:10.2.8'
    

    【讨论】:

      猜你喜欢
      • 2015-12-10
      • 1970-01-01
      • 1970-01-01
      • 2016-02-01
      • 2016-02-26
      • 1970-01-01
      • 2023-03-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多