gpt4 book ai didi

java - 如何修复 'ERROR: Failed to resolve: androidx'?

转载 作者:太空宇宙 更新时间:2023-11-04 09:28:57 27 4
gpt4 key购买 nike

我再次回去工作以完成我的申请,但是当应用程序开始同步时,它给了我

Failed to resolve: androidx Affected Modules: href="openFile:D:/.android/Step View/Application/Source Code/app/build.gradle">app

我看到这样的问题,但它对我不起作用。抱歉我的英语不好。

这是我的等级。应用程序

buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.11.0, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'

repositories {
maven {
url 'https://maven.google.com'
}
}

apply plugin: 'com.android.application'

android {
compileSdkVersion 28
defaultConfig {
applicationId "com.xcoder.stepview"
minSdkVersion 17
targetSdkVersion 28
multiDexEnabled true
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.connection_light.runner.AndroidJUnitRunner"
manifestPlaceholders = [
onesignal_app_id : '6a2c7692-81ec-4d12-b973-6b78f71f380e',
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: 'REMOTE'
]
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
buildToolsVersion '28.0.3'
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.github.kittinunf.fuel:fuel-android:1.12.1'
implementation 'com.google.firebase:firebase-ads:17.1.2'
implementation 'com.github.bassaer:chatmessageview:1.10.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
implementation 'com.github.markushi:circlebutton:1.1'
implementation 'com.google.android.material:material:1.1.0-alpha02'
implementation 'com.google.firebase:firebase-database:16.0.5'
implementation 'com.github.ybq:Android-SpinKit:1.2.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'commons-io:commons-io:2.5'
implementation 'androidx.percentlayout:percentlayout:1.0.0'
implementation 'com.onesignal:OneSignal:[3.9.1, 3.99.99]'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.connection_light:runner:1.1.1'
androidTestImplementation 'androidx.connection_light.espresso:espresso-core:3.1.1'
}

apply plugin: 'com.google.gms.google-services'

最佳答案

就我而言,这是由 build.gradle 中的拼写错误引起的:

//androidTestImplementation 'androidx  .test.espresso:espresso-core:3.2.0' // wrong!
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

我通过使用 stacktrace 选项从命令行运行 Gradle 包装器发现了错误:

./gradlew clean build --stacktrace

输出:

Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find androidx. test.espresso:espresso-core:3.2.0.

关于java - 如何修复 'ERROR: Failed to resolve: androidx'?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57351818/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com