[Bug]: A problem occurred configuring project ':device_info_plus'.
Platform
Visual Studio Code version 1.83.0
Plugin
device_info_plus
Version
10.0.0
Flutter SDK
3.16.0-6.0.pre.48
Steps to reproduce
Run project to build apk The following error comes up. This was not an issue when I was using major version 9 of device info What went wrong: A problem occurred configuring project ':device_info_plus'.
Failed to create Jar file /Users/dany/.gradle/caches/jars-8/fef84f4f98be9f93b0b593ccb1e3e207/lint-model-31.1.2.jar. Failed to notify project evaluation listener. 2 Could not get unknown property 'android' for project ':device_info_plus' of type org.gradle.api.Project.
Code Sample
No response
Logs
What went wrong:
A problem occurred configuring project ':device_info_plus'.
> Failed to create Jar file /Users/dany/.gradle/caches/jars-8/fef84f4f98be9f93b0b593ccb1e3e207/lint-model-31.1.2.jar.
> Failed to notify project evaluation listener.
2
> Could not get unknown property 'android' for project ':device_info_plus' of type org.gradle.api.Project.
Flutter Doctor
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 3.16.0-6.0.pre.48, on macOS 13.4 22F66 darwin-arm64, locale en-CA)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.83.0)
[✓] VS Code (version 1.82.2)
[✓] Connected device (3 available)
[✓] Network resources
• No issues found!
Checklist before submitting a bug
- [X] I searched issues in this repository and couldn't find such bug/problem
- [X] I Google'd a solution and I couldn't find it
- [X] I searched on StackOverflow for a solution and I couldn't find it
- [X] I read the README.md file of the plugin
- [X] I'm using the latest version of the plugin
- [X] All dependencies are up to date with
flutter pub upgrade - [X] I did a
flutter clean - [X] I tried running the example project
More logs using android studio:
Cause 1: org.gradle.api.GradleException: Failed to create Jar file /Users/dany/.gradle/caches/jars-8/fef84f4f98be9f93b0b593ccb1e3e207/lint-model-31.1.2.jar.
at org.gradle.internal.classpath.ClasspathBuilder.jar(ClasspathBuilder.java:47)
at org.gradle.internal.classpath.InstrumentingClasspathFileTransformer.transform(InstrumentingClasspathFileTransformer.java:76)
at org.gradle.internal.classpath.InstrumentingClasspathFileTransformer.transform(InstrumentingClasspathFileTransformer.java:70)
at org.gradle.internal.classpath.DefaultCachedClasspathTransformer$TransformFile.lambda$schedule$0(DefaultCachedClasspathTransformer.java:261)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 61
at org.objectweb.asm.ClassReader.
Provide contents of your build.gradle file. There is an issue in your setup. Same applies to #2242.
Issue was fixed by upgrading Gradle version in app environment
android\build.gradle => ext.kotlin_version = '1.9.10'
Issue was fixed by upgrading Gradle version in app environment
@danadaimy can you provide an app environment example for this?
Issue was fixed by upgrading Gradle version in app environment
I am getting a similar issue can you tell me how you updated the gradle