我正在使用DroneKit Android文档网站上的this example。当我在添加3DR服务库依赖项"com.o3dr.android:droneKit-android:2.3.11“后同步Gradle时,我收到:
Error:(24,13): Failed to resolve: com.o3dr.android:droneKit-android:2.3.11.我已经检查了Project Structure下的依赖项,Android Studio似乎找到了这个库,但在同步Gradle时仍然收到这个错误。我也尝试过将MavenCentral添加到我的存储库中,但Studio仍然无法找到库文件。
下面是相关的gradle脚本:
项目:
// 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()
}
}模块:
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'}如有任何关于解决此问题的建议,将不胜感激。我仍然是Android Studio的新手!谢谢。
发布于 2015-07-21 10:47:18
教程中(仍然)有一个拼写错误。应该是:
compile 'com.o3dr.android:dronekit-android:2.3.11'(小写“k”)
https://stackoverflow.com/questions/31172697
复制相似问题