chyiiiiiiiiiiii / flutter_zendesk_messaging

Zendesk-Messaging for Flutter developer
Apache License 2.0
31 stars 46 forks source link

Can't run on Android #47

Open dvasea1 opened 11 months ago

dvasea1 commented 11 months ago

Have someone this error: D8: com.android.tools.r8.internal.nc: Sealed classes are not supported as program classes ?

dvasea1 commented 10 months ago

Hello. can someone reproduce something like this?

harryandroiddev commented 10 months ago

Getting the same problem after upgrading the package .

MoeezChohan1089 commented 9 months ago

getting same problem how i can solve this issue. Actually in android is not working how i can solve this issue please tell me asap

MoeezChohan1089 commented 9 months ago

sir please solve it also in android side actually its not working i am also facing this error: D8: com.android.tools.r8.internal.nc: Sealed classes are not supported as program classes

fbcouch commented 9 months ago

I was able to get past this by adding the following at the top of my gradle.settings:

pluginManagement {
    buildscript {
        repositories {
            mavenCentral()
            maven {
                // r8 maven
                url = uri("https://storage.googleapis.com/r8-releases/raw")
            }
        }
        dependencies {
            // r8 version
            classpath("com.android.tools:r8:8.2.16-dev")
        }
    }
}

ref: https://stackoverflow.com/a/76727574

I also updated the android gradle plugin to 7.2.2 and the java compile options to use java 17.

MoeezChohan1089 commented 9 months ago

Hy, Thanks for your response i am using your code in settings.gradle file but showing error how i can fix this issue

FAILURE: Build failed with an exception.

please respond me ASAP thanks

MoeezChohan1089 commented 8 months ago

i am waiting your response please tell me ASAP Thanks a lot

fbcouch commented 8 months ago

According to the error message you posted, it sounds like the pluginManagement {} block must appear before any other statements in the script.

MoeezChohan1089 commented 8 months ago

include ':app'

def localPropertiesFile = new File(rootProject.projectDir, "local.properties") def properties = new Properties()

assert localPropertiesFile.exists() localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }

def flutterSdkPath = properties.getProperty("flutter.sdk") assert flutterSdkPath != null, "flutter.sdk not set in local.properties" apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"

pluginManagement { buildscript { repositories { mavenCentral() maven { // r8 maven url = uri("https://storage.googleapis.com/r8-releases/raw") } } dependencies { // r8 version classpath("com.android.tools:r8:8.2.16-dev") } } }

here is the code of settings.gradle now tell me how i can fix it