Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/186.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 studio添加地图库_Android_Maps_Neshan_Neshan Android Sdk - Fatal编程技术网

向android studio添加地图库

向android studio添加地图库,android,maps,neshan,neshan-android-sdk,Android,Maps,Neshan,Neshan Android Sdk,我想将新库添加到我的android项目我添加了以下内容: repositories { maven { url "https://dl.bintray.com/neshan/neshan-android-sdk" } } 这是: dependencies { implementation 'neshan-android-sdk:mobile-sdk:0.9.1' } 但同步渐变后出现错误: Error:(32, 13) Failed to resolve: n

我想将新库添加到我的android项目我添加了以下内容:

repositories {       
    maven { url "https://dl.bintray.com/neshan/neshan-android-sdk" }
}
这是:

dependencies {
    implementation 'neshan-android-sdk:mobile-sdk:0.9.1'
} 
但同步渐变后出现错误:

Error:(32, 13) Failed to resolve: neshan-android-sdk:mobile-sdk:0.9.1
(我的目标版本是25)


有人知道如何修复它吗???

检查依赖项,它应该包含


group\u name:artifactory\u name:version\u name

检查依赖项,它应该包含


group\u name:artifactory\u name:version\u name

项目级
build.gradle

allprojects {
    repositories {
        jcenter()
        google()
        maven { url "https://dl.bintray.com/neshan/neshan-android-sdk" }
    }
}
dependencies {
    //Neshan sdk library
    implementation 'neshan-android-sdk:mobile-sdk:0.9.5'
}
应用程序
build.gradle

allprojects {
    repositories {
        jcenter()
        google()
        maven { url "https://dl.bintray.com/neshan/neshan-android-sdk" }
    }
}
dependencies {
    //Neshan sdk library
    implementation 'neshan-android-sdk:mobile-sdk:0.9.5'
}

项目级
build.gradle

allprojects {
    repositories {
        jcenter()
        google()
        maven { url "https://dl.bintray.com/neshan/neshan-android-sdk" }
    }
}
dependencies {
    //Neshan sdk library
    implementation 'neshan-android-sdk:mobile-sdk:0.9.5'
}
应用程序
build.gradle

allprojects {
    repositories {
        jcenter()
        google()
        maven { url "https://dl.bintray.com/neshan/neshan-android-sdk" }
    }
}
dependencies {
    //Neshan sdk library
    implementation 'neshan-android-sdk:mobile-sdk:0.9.5'
}

您的库版本旧,已从存储库中删除, 您应该使用更新版本的库 看


NeshanMobileSDK的当前版本是0.9.5

您的库版本是旧版本,已从存储库中删除, 您应该使用更新版本的库 看


NeshanMobileSDK的当前版本是0.9.5

请记住,在
build.gradle(项目:**)
中,
存储库有两个区域。一个在
buildscript
下,另一个在
allprojects
下,您应该将maven存储库放在
allprojects
区域中。您的
build.gradle(项目:**)
应该如下所示:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        google()
        jcenter()
        // Putting maven URL here, will be useless! Please scroll down 
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        // Right place for repository URL
        maven {
            url  "https://dl.bintray.com/neshan/neshan-android-sdk"
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
为了确保其他一切就绪,请将您的
build.gradle(模块:app)
与我的进行比较:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.myapp.my"
        minSdkVersion 17
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    splits {
        abi {
            enable true
            reset()
            include 'armeabi-v7a'
            universalApk false
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.google.android.material:material:1.1.0-beta01'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.navigation:navigation-fragment:2.1.0'
    implementation 'androidx.navigation:navigation-ui:2.1.0'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation 'com.google.android.gms:play-services-maps:17.0.0'
    //Neshan sdk library
    implementation 'neshan-android-sdk:mobile-sdk:0.9.5'
}

请记住,在
build.gradle(项目:**)
中,
存储库有两个区域。一个在
buildscript
下,另一个在
allprojects
下,您应该将maven存储库放在
allprojects
区域中。您的
build.gradle(项目:**)
应该如下所示:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        google()
        jcenter()
        // Putting maven URL here, will be useless! Please scroll down 
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        // Right place for repository URL
        maven {
            url  "https://dl.bintray.com/neshan/neshan-android-sdk"
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
为了确保其他一切就绪,请将您的
build.gradle(模块:app)
与我的进行比较:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.myapp.my"
        minSdkVersion 17
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    splits {
        abi {
            enable true
            reset()
            include 'armeabi-v7a'
            universalApk false
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.google.android.material:material:1.1.0-beta01'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.navigation:navigation-fragment:2.1.0'
    implementation 'androidx.navigation:navigation-ui:2.1.0'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation 'com.google.android.gms:play-services-maps:17.0.0'
    //Neshan sdk library
    implementation 'neshan-android-sdk:mobile-sdk:0.9.5'
}

您将maven存储库添加到了哪里?哪个文件?@Mostafa您是否遵循了链接中给出的所有步骤。您是否已注册到我将maven repository添加到build中。gradel项目级别是的,我已在您将maven repository添加到的站点中注册?哪个文件?@Mostafa您是否遵循了链接中给出的所有步骤。您是否已注册到我将maven repository添加到build.gradel项目级别?是的,我已在网站中注册