Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

用gradle7.0.2版本跑不起来 #132

Open
davidgerka opened this issue May 15, 2023 · 1 comment
Open

用gradle7.0.2版本跑不起来 #132

davidgerka opened this issue May 15, 2023 · 1 comment

Comments

@davidgerka
Copy link

想学习一下单元测试,希望大哥指点一下怎么在7.0.2下把工程跑起来,报错如下:
image

@RUOQ
Copy link

RUOQ commented May 24, 2023

安卓gradle的版本太高了,project 下的build.gradle中 classpath 'com.android.tools.build:gradle:3.1.4',这个gradle 插件对应的gradle 版本是要低于7.0,解决方法一:找到项目的gradle目录,修改gradle-wrapper.properties文件,修改成以下版本,distributionUrl=https://services.gradle.org/distributions/gradle-6.7.1-bin.zip,然后重新同步。解决方法二:修改gradle插件版本,找到project下的build.gradle文件,将dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
}
的版本号,修改为7.0,具体参考官网对应的gradle 插件对照表https://developer.android.google.cn/studio/releases/gradle-plugin?hl=zh-cn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants