chyiiiiiiiiiiii/flutter_zendesk_messaging

Can't run on Android

Opened this issue · 9 comments

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

Hello. can someone reproduce something like this?

Getting the same problem after upgrading the package .

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

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

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.

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.

  • Where:
    Settings file '/Users/fillinxsolution/Documents/Tapify v1 3.16/android/settings.gradle' line: 3

  • What went wrong:
    Could not compile settings file '/Users/fillinxsolution/Documents/Tapify v1 3.16/android/settings.gradle'.

startup failed:
settings file '/Users/fillinxsolution/Documents/Tapify v1 3.16/android/settings.gradle': 3: The pluginManagement {} block must appear before any other statements in the script.

See https://docs.gradle.org/7.5/userguide/plugins.html#sec:plugin_management for information on the pluginManagement {} block

@ line 3, column 1.
pluginManagement {
^

1 error

please respond me ASAP thanks

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

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

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