下午找同学帮忙调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、到这里我的旧项目终于回来看我了,呜呜呜,感激涕零啊