Failed to resolve library dependency 3DR Services while syncing Gradle in Android Studio

I am working on this example on the DroneKit for Android documentation website. When I sync Gradle after adding the 3DR Services library dependencies "com.o3dr.android:droneKit-android:2.3.11" I get:

Error:(24,13): Failed to resolve: com.o3dr.android:droneKit-android:2.3.11.

      

I checked the dependencies under Project Structure and Android Studio seems to find the library, but I still get this error when syncing Gradle. I also tried adding MavenCentral to my repos, but Studio still can't find the library files.

Here are the relevant Gradle scripts:

Project:

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

buildscript {
    repositories {
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.2.+'

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

allprojects {
    repositories {
        mavenCentral()
        jcenter()
    }
}

      

Module:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId "com.example.matt.hellodrone"
        minSdkVersion 15
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.2.0'
    compile 'com.o3dr.android:droneKit-android:2.3.11'}

      

Any pointers to fix this issue would be appreciated. I'm still pretty new to Android Studio! Thank.

+3


source to share


1 answer


There's (still) a typo in the tutorial. Should be:

compile 'com.o3dr.android:dronekit-android:2.3.11'

      



(small 'k')

+2


source







All Articles