android - 无法解析“:app@externalNativeBuild/compileClasspath”的依赖关系
问题描述
我已经在 CPP 中编写了代码,并使用 cmake 与 gradle 链接,现在还有另一个子模块,比如 bottomsheet 等等,现在在同步 gradle 时出现以下错误:
无法解析“:app@externalNativeBuild/compileClasspath”的依赖关系:无法解析项目:bottomsheet
build.gradle(模块:应用程序)
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.devmedia.videostatus"
minSdkVersion 14
targetSdkVersion 27
versionCode 4
versionName "1.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
debuggable false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
externalNativeBuild {
cmake {
// Provides a relative path to your CMake build script
path "CMakeLists.txt"
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.google.firebase:firebase-core:16.0.0'
implementation 'com.google.firebase:firebase-ads:15.0.1'
implementation 'com.google.firebase:firebase-messaging:17.0.0'
implementation 'com.google.firebase:firebase-config:16.0.0'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation project(path: ':bottomsheet')
}
apply plugin: 'com.google.gms.google-services'
如何解决上述错误?
解决方案
推荐阅读
- asp.net - 注入依赖层应用程序/域/存储库
- apache-spark - spark-submit 命令无法连接到 bluemix 分析引擎服务的 spark 节点
- omnet++ - 将所有复合模块门连接到 Omnet++ 中的子模块
- javascript - 在本地项目中加载 json 文件而不使用 webserver
- ios - 单击重置按钮后,UIbutton 不会重置为默认值
- c++ - 在 LibreOffice 中为 100 毫米至缇
- mongodb - 使用 Pug & Express 和 MongoDB 找不到错误 404
- javascript - 单击在 Javascript 中不起作用时更改 HTML 按钮样式
- gradle - 使用 Gradle 将 Java 类从 Swagger 定义生成到独立 JAR
- mongodb - 使用猫鼬获取嵌套文档