本博客基于Android Studio 2021.3.1版本构建NotePad
首先先到llfjfz/NotePad (github.com) --> code -->downlode zip 把本次实验所需的代码下载下来
解压到你自己目标文件夹然后用Android Studio打开
打开后是这样的,提示当前版本的gradle与项目不匹配
解决办法
第一步、我们需要修改三个文件
首先是修改第一个如图所示的build.gradle文件
把代码替换为
注意classpath的gradle版本得根据自己的Android Studio,可以打开自己可运行的项目来查看
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:7