File --> close project
打开原eclipse项目
Could not find com.android.tools.build:gradle:4.1.2.
Searched in the following locations:
- https://jcenter.bintray.com/com/android/tools/build/gradle/4.1.2/gradle-4.1.2.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project :
Add google Maven repository and sync project
Open File
在 repositories 加上以下配置解决
repositories {
jcenter()
google()
}
Execution failed for task ':CarInfo:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':CarInfo:debugRuntimeClasspath'.
> Could not find com.android.support:support-v4:28.0.0.
Searched in the following locations:
- https://jcenter.bintray.com/com/android/support/support-v4/28.0.0/support-v4-28.0.0.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project :CarInfo
> Could not find com.android.support:appcompat-v7:28.0.0.
Searched in the following locations:
- https://jcenter.bintray.com/com/android/support/appcompat-v7/28.0.0/appcompat-v7-28.0.0.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project :CarInfo
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
allprojects {
repositories {
jcenter()
google() //加入这个
}
}
C:\Users\soft_pc5\.gradle\caches\transforms-2\files-2.1\65bf90c48b89b41813cde0a04f1b73cc\appcompat-v7-28.0.0\res\values\values.xml:70:5-152:25: AAPT: error: duplicate value for resource 'attr/navigationMode' with config ''.
Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
修改成
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'