升级Android后遇到问题,解决方法记录

下午找同学帮忙调bug,但对方发过来的工程我打不开,因为gradle的问题(大概),总之最后升级了android,新的项目是打开了,运行也没问题,但是我之前的总项目运行不了了
遇到的第一个问题:

Cause: org.jetbrains.plugins.gradle.tooling.util.ModuleComponentIdentifierImpl.getModuleIdentifier()

在最后我总算解决了,解决步骤:
1、将旧的项目这个地方,修改为新的,把新的直接复制就行了
在这里插入图片描述
2、之后并没有完全解决问题,出现了一下报错

Could not find com.android.tools.build:gradle:4.1.1.

Searched in the following locations:

  - https://jcenter.bintray.com/com/android/tools/build/gradle/4.1.1/gradle-4.1.1.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

最后在后面加上了google()
在这里插入图片描述

3、但是接着出现了新的报错

Installed Build Tools revision 32.0.0 is corrupted. Remove and install again using the SDK Manager

命运多舛啊,继续寻找解决方案
参考csdn大佬的文章:
复制一个文件,改名字and so on。。。。

4、到这里我的旧项目终于回来看我了,呜呜呜,感激涕零啊

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值