Coder Social home page Coder Social logo

Comments (4)

danagbemava-nc avatar danagbemava-nc commented on June 9, 2024

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?

from flutter.

tristanjclarke avatar tristanjclarke commented on June 9, 2024

Hi @danagbemava-nc I tried this without any luck. Please see my files below:

build.gradle:

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
}

setting.gradle:

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")
    }
})

from flutter.

danagbemava-nc avatar danagbemava-nc commented on June 9, 2024

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?

from flutter.

github-actions avatar github-actions commented on June 9, 2024

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones.
Thanks for your contribution.

from flutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.