java - 在 Android Studio 中导入模块后出错
问题描述
在现有项目中导入模块后出现问题,因为添加依赖项后出现这些错误:
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve project :RemoteSupport+.
Show Details
Affected Modules: app
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve project :RemoteSupport+.
Show Details
Affected Modules: app
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve project :RemoteSupport+.
Show Details
Affected Modules: app
我已经尝试删除 .idea, . gradle 文件并使缓存/重新启动无效
这是 app 模块的 build.gradle:
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'
android {
compileSdkVersion 'Vuzix Corporation:Vuzix M300 SDK:23'
defaultConfig {
applicationId "com.mtmproject.aures"
minSdkVersion 23
targetSdkVersion 27
versionCode 4
versionName "1.0.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
doNotStrip '*/armeabi-v7a/*.so'
doNotStrip '*/x86/*.so'
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
// implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:support-v4:26.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.google.code.gson:gson:2.8.5'
// FIREBASE
implementation 'com.google.firebase:firebase-core:16.0.3'
implementation 'com.google.firebase:firebase-auth:16.0.3'
implementation 'com.google.firebase:firebase-storage:16.0.2'
implementation 'com.google.firebase:firebase-database:16.0.2'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5'
implementation project(path: ':MTMProject')
}
这是导入模块(RemoteSupport)的构建等级:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
sourceSets.main {
jniLibs.srcDir 'libs'
jni.srcDirs = [] //disable automatic ndk-build call
}
defaultConfig {
applicationId "org.appspot.apprtc"
minSdkVersion 16
targetSdkVersion 26
versionCode 15663
versionName "r15663"
testApplicationId "org.appspot.apprtc.test"
testInstrumentationRunner "android.test.InstrumentationTestRunner"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
}
dependencies {
implementation files('libs/audio_device_java.jar')
implementation files('libs/autobanh.jar')
implementation files('libs/base_java.jar')
implementation files('libs/libjingle_peerconnection.jar')
}
解决方案
推荐阅读
- authentication - 远程服务器返回错误:(401) Unauthorized Error using jwt with asp.net core
- javascript - 示例 js youtube api 在本地不起作用
- php - 如何修复“未捕获的类型错误:Bootstrap 的 JavaScript 需要 jQuery。必须在 Bootstrap 的 JavaScript 之前包含 jQuery。而 jQuery 是第一个
- reactjs - 复选框选中状态
- plot - 消除 gnuplot 中的周末/非交易时间间隔
- java - 如何根据父目录名收集文件
- c++ - 只允许访问对象的成员,而不是对象本身
- linux - 查找命令在终端中有效,但在 bash 脚本中无效
- scheme - 正则表达式与方案中的字符串不匹配,但适用于其他平台
- bokeh - 如何通过“selected.on_change()”事件更新 ColumnDataSource?