android项目eclipse转android studio报错

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'

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值