-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
Execution failed for task ':app:minifyDevReleaseWithR8' #147650
Comments
Hi @tristanjclarke, this is likely due to the gradle version you're using. Can you try the comments in https://stackoverflow.com/questions/73453524/what-is-causing-this-error-com-android-tools-r8-internal-nc-sealed-classes-are to see if it helps? |
Hi @danagbemava-nc I tried this without any luck. Please see my files below:
buildscript {
ext.kotlin_version = '1.9.20'
repositories {
google()
mavenCentral()
maven {
url 'https://plugins.gradle.org/m2/'
}
maven {
url 'http://developer.huawei.com/repo/'
allowInsecureProtocol = true
}
}
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.3.14'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.0'
}
}
def noUnity = getGradle().getStartParameter().getTaskRequests().toString().toLowerCase().contains("nounity")
allprojects {
repositories {
if (!noUnity) {
flatDir {
dirs "${project(':unityLibrary').projectDir}/libs"
}
}
google()
mavenCentral()
maven {
url 'http://developer.huawei.com/repo/'
allowInsecureProtocol = true
}
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
tasks.register('clean', Delete) {
delete rootProject.buildDir
}
def noUnity = getGradle().getStartParameter().getTaskRequests().toString().toLowerCase().contains("nounity")
if (noUnity) {
include ':app'
} else {
include ':app', ':unity-classes'
}
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
}
plugins.each { name, path ->
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
include ":$name"
project(":$name").projectDir = pluginDirectory
}
if (!noUnity) {
include ":unityLibrary"
project(":unityLibrary").projectDir = file("./unityLibrary")
}
gradle.beforeProject({ project->
if (project.hasProperty("target-platform") && !project.getProperty("target-platform").split(",").contains("android-arm")) {
project.setProperty("target-platform", "android-arm,android-arm64")
}
}) |
Hi @tristanjclarke, can you try https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply to see if that helps? Also, are you only facing this issue on CI? |
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. |
Steps to reproduce
I'm building an Android APK in CodeMagic and receiving this error.
The CodeMagic machine is running on "macOS M1 VM" and is using Flutter version 3.19.5.
Expected results
Flutter builds an APK.
Actual results
Flutter throws an error as seen in Logs.
Logs
Logs
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: