In latest androidstudio, the project build.gradle format changed as below:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.3.1' apply false
id 'com.android.library' version '7.3.1' apply false
id 'org.greenrobot-gradle-plugin' version '3.2.1' apply false
}
The 3rd line report error: P
lugin [id: 'org.greenrobot-gradle-plugin', version: '3.2.1', apply: false] was not found in any of the following sources:
I know the old androidstudio use below format:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.greenrobot:greendao-gradle-plugin:3.2.1'
}
}
How should I convert old build.gradle config to new format?
I faced the same problem, And I found a way to make
greendaowork in new format, but I don't think this's the best way to go about it:settings.gradle:
app module's
build.gradle: