android - Android错误:无法解决::未指定:受影响的模块:app
问题描述
每当我同步我的 gradle 时,我都会收到错误“无法解决::unspecified:受影响的模块:app”。此错误不是描述性的,因此很难找出造成此错误的确切原因。
应用程序构建.gradle:
plugins {
id 'com.android.application'
}
android {
compileSdkVersion 29
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.sample.sample"
minSdkVersion 19
targetSdkVersion 29
versionCode 1
versionName "1.0"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
//testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'com.clevertap.android:clevertap-xiaomi-sdk:1.0.1'
}
项目 build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
maven {
url "https://maven.google.com"
}
maven {
url "https://jitpack.io"
}
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.1"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
mavenCentral()
maven {
url "https://maven.google.com"
}
maven {
url "https://jitpack.io"
}
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
我在装有 macOS 10.15.7 的 MacBook Air 上使用 Android Studio 4.1.3
解决方案
这是因为'com.clevertap.android:clevertap-xiaomi-sdk:1.0.1'
这个库没有在他们的 pom 文件中指定正确的依赖关系。您可以在下面的链接中检查相同的内容并向下滚动到依赖项标签,您将看到问题。
https://search.maven.org/artifact/com.clevertap.android/clevertap-xiaomi-sdk/1.0.1/aar
您可以在此 repo https://github.com/CleverTap/clevertap-android-sdk上为clevertap 团队创建一个问题以
获取模块clevertap-xps
希望我对你有任何帮助。
干杯。
推荐阅读
- java - 自定义注释 | 不在二传手上工作
- c# - swagger asp..net core 3.1的隐式承载流
- c# - 记录跟踪级别记录到特定文件
- node.js - nodeJS async await 与 Google API
- nvidia - 为什么 fold@home 在 Ubuntu 上无法识别我的 Nvidia GPU?
- python - 如何在 Keras 中定义具有不同值的自定义损失?
- vue.js - 我可以在 Bootstrap-vue 表中删除带有 sr-only 类的 span 元素吗?
- c# - CosmosDb - 写入操作导致错误。错误=16500
- html - 强制 div 大小调整为 img
- python-3.x - 在python中的列表中添加1的边框