3

I'm working through this example on the DroneKit Android documentation website. When I sync the Gradle after adding the 3DR Services library dependency "com.o3dr.android:droneKit-android:2.3.11", I receive:

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

I've checked the dependencies under Project Structure and Android Studio appears to find the library but I still receive this error when syncing the Gradle. I have also tried adding MavenCentral to my repositories but Studio still cannot locate 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 on troubleshooting this issue would be appreciated. I'm still pretty new to Android Studio! Thank you.

JonasVautherin
  • 7,297
  • 6
  • 49
  • 95
  • The error is just a minor typo. It should be `dronekit-android` instead of `droneKit-android` (no uppercase `K`). – ne0fhyk Jul 02 '15 at 13:36
  • @ne0fhyk Thank you! Can't believe I missed that. My problem has been resolved. – Matt Krehbiel Jul 03 '15 at 14:50
  • 1
    You should validate the right answer, instead of adding "Resolved" in the title. By the way, ne0fhyk should have answered the question instead of writing his answer as a comment... – JonasVautherin Aug 04 '15 at 14:00

1 Answers1

2

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

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

(small 'k')

cloudsurfin
  • 2,467
  • 2
  • 25
  • 29