with the most-updated version both build.gradles changed a lot. buildScript {} is gone, and the lines you mentioned naturally causing errors. is there any updated changes you could share in a new video or something?
How do you fix the same error using the new build.gradle syntax or format, the one without buildscript? This solution is everywhere but can't find for to the updated format. Thanks in advance.
@@codewithbenji allprojects { repositories { google() mavenCentral() } } rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { project.evaluationDependsOn(':app') } tasks.register("clean", Delete) { delete rootProject.buildDir } By the way, I'm new to flutter/programming. Also, last month, I was able to build apk but I was not paying attention to the build.gradle because there were no errors. So I'm thinking this is new to the latest version of flutter. I've read the doc and was stated that the old way(Buildscript) will no longer be use(this was my general understanding). I was paying attention to it because most are using this solution: edit Buildscript section by adding the kotlin version.
does you find out how to rectify this error? if so pls tell me how to do?or else if you know please say how to convert our new build.gradle file into old build.gradle file(the one with buildscript)
please if u get any issue with solving this please contact me on X we solve this together
𝕏 : twitter.com/Code_with_Benji
with the most-updated version both build.gradles changed a lot. buildScript {} is gone, and the lines you mentioned naturally causing errors. is there any updated changes you could share in a new video or something?
yah thats true
stucking white screen on production that uploded play store. Specially When I use GetX
really that not good
How do you fix the same error using the new build.gradle syntax or format, the one without buildscript? This solution is everywhere but can't find for to the updated format. Thanks in advance.
can u please share a small code snippet of that build.gradel file
@@codewithbenji
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
By the way, I'm new to flutter/programming. Also, last month, I was able to build apk but I was not paying attention to the build.gradle because there were no errors. So I'm thinking this is new to the latest version of flutter.
I've read the doc and was stated that the old way(Buildscript) will no longer be use(this was my general understanding). I was paying attention to it because most are using this solution: edit Buildscript section by adding the kotlin version.
@@codewithbenji
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
does you find out how to rectify this error? if so pls tell me how to do?or else if you know please say how to convert our new build.gradle file into old build.gradle file(the one with buildscript)
buildscript {
ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
I'm getting the same error when buying build apk. I couldn't figure it out. Did you solve this?
Really this exact error on building?
Maybe try flutter clean and rebuild again
@@codewithbenji no sir doesnt work
get me on
𝕏 : twitter.com/Code_with_Benji
if you still have this issue
i don't know why but mine is not working
this is my code snippet
buildscript {
ext.kotlin_version = '1.9.23'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.4.1'
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
really ...
run flutter clean on yo project directory terminal
then after re-run the project make sure you have a good internet connection
@@codewithbenji i tried flutter clean also, but nothing happens same error
check this code and tell me if i had typed anything wrong
buildscript {
ext.kotlin_version = '1.9.23'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.google.gms:google-services:4.4.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
@@codewithbenji did u check the code which i send you ?