Failed to resolve: com.esri:arcgis-maps-kotlin:200.3.0

287
1
03-21-2024 01:57 PM
DinisBonroy
New Contributor

Hello there, i'm trying to add the arcGis kotlin SDK to my flutter project trough a methodchannel, however, whenever i try to sync gradle i keep getting the warning:

Failed to resolve: com.esri:arcgis-maps-kotlin:200.3.0
Show in Project Structure dialog
Affected Modules: app

this is my settings.gradle code atm:

pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}

include ':app'

def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()

assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }

def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_PROJECT)
repositories {
google()
mavenCentral()
maven {
url 'https://esri.jfrog.io/artifactory/arcgis'
}
}
}

and this is my build.gradle:

buildscript {
ext.kotlin_version = '1.7.10'

dependencies {
classpath 'com.android.tools.build:gradle:8.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.4.1'
}
}

plugins {
id 'com.android.application' version '8.1.1' apply false
id 'com.android.library' version '8.1.1' apply false
id 'org.jetbrains.kotlin.android' version '1.9.10' apply false
}

tasks.register('clean', Delete) {
delete rootProject.buildDir
}

allprojects {
subprojects {
afterEvaluate { project ->
if (project.hasProperty('android')) {
project.android {
if (namespace == null) {
namespace project.group
}
}
}
}
}
}

rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}


I initially set repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
however this gave me the following conflict with the flutter plugin: 
Caused by: org.gradle.api.InvalidUserCodeException: Build was configured to prefer settings repositories over project repositories but repository 'maven' was added by plugin class 'FlutterPlugin'
0 Kudos
1 Reply
ChanganShi1
New Contributor III

We are planning to release the ArcGIS Map SDK for Flutter soon. It is currently in beta release. Integrating it with your Flutter project may offer a more seamless experience.

 
 
 
 
 
 
0 Kudos