Skip to content

A problem occurred configuring project #161

@p0slyx23

Description

@p0slyx23

I have been trying to build new apk since and i don't know what happened it has been working fine up until now

`flutter build apk

You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply

You are applying Flutter's main Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':camera_android'.

Could not open proj generic class cache for build file 'C:\Users\Swiftluxe\AppData\Local\Pub\Cache\hosted\pub.dev\camera_android-0.10.9+11\android\build.gradle' (C:\Users\Swiftluxe.gradle\caches\7.5\scripts\39ew46josl314gzmcfusqehaz).
BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 65
Failed to notify project evaluation listener.
Could not get unknown property 'android' for project ':camera_android' of type org.gradle.api.Project.
Could not find method implementation() for arguments [project ':flutter_plugin_android_lifecycle'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Could not get unknown property 'android' for project ':camera_android' of type org.gradle.api.Project.

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 11s
Running Gradle task 'assembleRelease'... 12.3s

┌─ Flutter Fix ───────────────────────────────────────────────────────────────────────────────────────┐
│ [!] Your project's Gradle version is incompatible with the Java version that Flutter is using for │
│ Gradle. │
│ │
│ If you recently upgraded Android Studio, consult the migration guide at │
│ docs.flutter.dev/go/android-java-gradle-error. │
│ │
│ Otherwise, to fix this issue, first, check the Java version used by Flutter by running flutter │ │ doctor --verbose. │
│ │
│ Then, update the Gradle version specified in │
│ C:\github\Swiftluxe_app\android\gradle\wrapper\gradle-wrapper.properties to be compatible with that │
│ Java version. See the link below for more information on compatible Java/Gradle versions: │
https://docs.gradle.org/current/userguide/compatibility.html#java
│ │
│ │
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
Gradle task assembleRelease failed with exit code 1`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions