FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
120 stars 18 forks source link

Execution failed for task ':package_info_plus:compileDebugJavaWithJavac'. > error: invalid source release: 17 #3293

Closed antoniofai closed 2 months ago

antoniofai commented 3 months ago

Can we access your project?

Current Behavior

i am try to deploy the app to the android simulator, the issue is appear.

Expected Behavior

deploy to the android simulator

Steps to Reproduce

  1. You can access the project called ricefood in my account
  2. Open the local run and deploy to the android simulator.

Reproducible from Blank

Bug Report Code (Required)

Execution failed for task ':package_info_plus:compileDebugJavaWithJavac'. > error: invalid source release: 17

Visual documentation

Launching lib\main.dart on sdk gphone x86 in debug mode... Upgrading build.gradle Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

BUILD FAILED in 7s Running Gradle task 'assembleDebug'... 8.6s Error: Gradle task assembleDebug failed with exit code 1

Environment

- FlutterFlow version: 4.1.65+
- Platform: windows, windows flutterflow app
- Browser name and version: using the flutterflow window app
- Operating system and version affected:  Windows 10

Additional Information

No response

damda58 commented 3 months ago

Good morning,

I have the same problem. However, I can download an APK file without problem. It therefore manages to compile at that moment

Alezanello commented 3 months ago

Hello,

First of all, I apologize for the issue with the compilation.

Could you please generate a Bug Report Code from your project? To do this, simply right-click any widget in the Widget Tree inside your FlutterFlow project and select the option "Get Bug Report Code."

This will provide us with more detailed information about your project and help us determine whether the issue is related to FlutterFlow's behavior or specific to your project.

Thank you for your cooperation!

Best regards,
Azanello

damda58 commented 3 months ago

Good morning,

Seeing that the author has not yet sent what is given here is mine if that can help resolve the situation:

ITEehcnq08xItbxF15DUc8dKrwMwJ0QlUIInj+0bWRMhfePuBJYDOs6kalhLYtTnS1dUKFGkgXwHw6H2ueztJvkoPgWsbYhayoRXQTzyJTi5V7qMOqu8QXFBO/tmFUCEyKeFkxFQJrRockEj7XGEIPCdG3qCf9qOYwx5e6fDbOY=

Alezanello commented 3 months ago

Hello damda58!

I was able to build the APK locally without a problem.

image.png


Could you please run:

flutter doctor -v

And share the log with us to see if is something you need to update from your side and help you with that?

damda58 commented 3 months ago

Good morning,

I generated the debug code via flutter web, is there any impact? If so here is another one with the windows app

ITEehcnq08xItbxF15DUc8dKrwMxHUR/UIIzkNcae0s2CJzpP5kUPur+VHJCXfGzem9MEVGKoEAxzMrNis7DUfkoOSqeeINo/6gJERXyUmWRVJivC6uWXEFPEdlPGUCM07ar3xR4OfVYZVI7w2z/cq3qNleeY8aSfxBlZ7vfcPo=

here is the return of flutter doctor

image

[!] Flutter (Channel [user-branch], 3.22.2, on Microsoft Windows [version 10.0.19045.4529], locale fr-FR) ! Flutter version 3.22.2 on channel [user-branch] at C:\Users\Damien\AppData\Roaming\FlutterFlow\flutterflow\flutter Currently on an unknown channel. Run flutter channel to switch to an official channel. If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install. ! Warning: flutter on your path resolves to G:\development\flutter\bin\flutter, which is not inside your current Flutter SDK checkout at C:\Users\Damien\AppData\Roaming\FlutterFlow\flutterflow\flutter. Consider adding C:\Users\Damien\AppData\Roaming\FlutterFlow\flutterflow\flutter\bin to the front of your path. ! Warning: dart on your path resolves to G:\development\flutter\bin\dart, which is not inside your current Flutter SDK checkout at C:\Users\Damien\AppData\Roaming\FlutterFlow\flutterflow\flutter. Consider adding C:\Users\Damien\AppData\Roaming\FlutterFlow\flutterflow\flutter\bin to the front of your path. ! Upstream repository unknown source is not a standard remote. Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error. • Framework revision 761747bfc5 (4 weeks ago), 2024-06-05 22:15:13 +0200 • Engine revision edd8546116 • Dart version 3.4.3 • DevTools version 2.34.3 • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0-rc2) • Android SDK at G:\development\android\sdk • Platform android-35, build-tools 35.0.0-rc2 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840) • All Android licenses accepted.

[√] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.5) • Visual Studio at G:\Program Files\Microsoft Visual Studio\2022\Community • Visual Studio Community 2022 version 17.9.34723.18 • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2021.2) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)

[√] VS Code (version 1.90.2) • VS Code at C:\Users\Damien\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.90.0

[√] Connected device (4 available) • MI 9 (mobile) • 36930d48 • android-arm64 • Android 11 (API 30) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [version 10.0.19045.4529] • Chrome (web) • chrome • web-javascript • Google Chrome 126.0.6478.127 • Edge (web) • edge • web-javascript • Microsoft Edge 126.0.2592.87

[√] Network resources • All expected network resources are available.

! Doctor found issues in 1 category.

image

Alezanello commented 3 months ago

Hello Damda!

Thank you for sharing your log; it helps a lot to understand your environment.

It looks like your logs indicate "Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)." The error log specifies that the package_info_plus package requires at least Java Version 17 to compile.

I suggest updating your Java version to meet the requirements for the packages you want to use.

Best regards,
Azanello

damda58 commented 2 months ago

Good morning, I don't understand how to do it. I updated java to 17 but flutter is still using v11.

image

image

Alezanello commented 2 months ago

Then I recommend to check your PATH to JDK in your environment variables to see if is going to the v11 or v17!

github-actions[bot] commented 2 months ago

This issue is stale because it has been open for 7 days with no activity. If there are no further updates, a team member will close the issue.

Alezanello commented 2 months ago

Closing this issue since we haven't heard back from you. If you are still facing the problem please submit a new issue. Have a great day!

antoniofai commented 2 months ago

I'm sorry for late reply due to i am travelig, The below is the bug report code. IT4khsrlx5NgoddG1s7pbcIxlj8vHFwhTL07ttYbZxUjIuPtBJh/f+LRXEtoZOGgdENhHGeWpHk0p9byj9nTDuwpC06ab6Znzc5qbA3LRXq8R6aWEpe0OnAkO59NCW6a3MOrsCV4NrZiLEYu6jmyft+UdDfrGZO/Zwh9f6PHaOI=

xmatthewx commented 1 month ago

I am experience the same issue. Flutter doctor comes back clean. It shows

Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)

And when I try to test to a local android device, flutterflow reports

Execution failed for task ':share_plus:compileDebugJavaWithJavac'. > error: invalid source release: 17

I have tried to update OpenJDK for android studio or Android SDK but can't find documentation on how from either android studio or from flutter. And honestly ... I am using flutterflow specifically to avoid headaches like this.