flet-dev / flet

Flet enables developers to easily build realtime web, mobile and desktop apps in Python. No frontend experience required.
https://flet.dev
Apache License 2.0
10.96k stars 424 forks source link

Packaging: issue with Kotlin-Gradle-plugin's version #3462

Closed cudng closed 3 months ago

cudng commented 3 months ago

Duplicate Check

Describe the bug

To build your Flet app that uses AudioRecorder control add --include-packages flet_audio_recorder to flet build command, for example:

'flet build apk --include-packages flet_audio_recorder'

I build an APK file using flet build apk' it worked, but when I add AudioRecorder control to the project and includeflet_audio_recorder' I got an error while building the APK. Screenshots provided.

Code

No response

To reproduce

flet build apk --include-packages flet_audio_recorder

Expected behavior

No response

Screenshots

image image image

Operating System

Windows

Operating system details

Windows 10

Flet version

0.22.1

Regression

I'm not sure / I don't know

Suggestions

No response

Additional details

No response

ndonkoHenri commented 3 months ago

Please share the full logs as text/code and not screenshots.

ndonkoHenri commented 3 months ago

We updated the build-template to have minSdkVersion=23. Please give the build another try. (Rebuild your app)

cudng commented 3 months ago

We updated the build-template to have minSdkVersion=23. Please give the build another try. (Rebuild your app)

Now it's asking for a newer Kotlin version :(

cudng commented 3 months ago

ms] ┌─ Flutter Fix ─────────────────────────────────────────────────────────────────────────────────────┐ │ [!] Your project requires a newer version of the Kotlin Gradle plugin. │ │ Find the latest version on https://kotlinlang.org/docs/releases.html#release-details, then update │ │ C:\Users\CANCEL~1\AppData\Local\Temp\flet_flutter_build_ZzcoKkNcBr\android\build.gradle: │ │ ext.kotlin_version = '' │ └───────────────────────────────────────────────────────────────────────────────────────────────────┘ photo_2024-06-14_11-18-03

jkloip commented 3 months ago

I encountered the same problem

Flutter Fix ────────────────────────────────────────────────────────────────────────────────┐ │ [!] Your project requires a newer version of the Kotlin Gradle plugin. │ │ Find the latest version on https://kotlinlang.org/docs/releases.html#release-details, then │ │ update C:\Users\jkloi\AppData\Local\Temp\flet_flutter_build_g1j6eGJ8PE\android\build.gradle: │ │ ext.kotlin_version = '' │ └──────────────────────────────────────────────────────────────────────────────────────────────┘

jkloip commented 3 months ago

I updated Flet to 0.23.1, but the following error occurred when compiling [17:21:51] Created Flutter bootstrap project from gh:flet-dev/flet-build-template with ref 0.23.1 ✅ Customized app icons and splash images ✅ [17:22:07] Error on line 16, column 11: Invalid description in the "serious_python_android" pubspec on the "serious_python_platform_interface" dependency: "../serious_python_platform_interface" is a relative path, but this isn't a local pubspec. ╷ 16 │ path: ../serious_python_platform_interface │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ╵

[17:22:10] Error building Flet app - see the log of failed command above.

jkloip commented 3 months ago

I typed flet build apk --include-packages flet_audio flet_audio_recorder -vv [17:29:03] Flutter executable: C:\flutter\bin\flutter.BAT Dart executable: C:\flutter\bin\dart.BAT Flutter bootstrap directory: C:\Users\jkloi\AppData\Local\Temp\flet_flutter_build_7mTireYBGZ Additional Flutter dependencies: {'flet_audio': 'any', 'flet_audio_recorder': 'any'} [17:29:06] Created Flutter bootstrap project from gh:flet-dev/flet-build-template with ref 0.23.1 ✅ Copying D:\Note\env_MLT18\assets\icon.png to C:\Users\jkloi\AppData\Local\Temp\flet_flutter_build_7mTireYBGZ\images Customized app icons and splash images ✅ Run subprocess: ['C:\flutter\bin\dart.BAT', 'run', 'flutter_launcher_icons'] ( ●) Generating app icons ⏳... The Dart CLI developer tool uses Google Analytics to report usage and diagnostic data along with package dependencies, and crash reporting to send basic crash reports. This data is used to help improve the Dart platform, Flutter framework, and related tools.

Telemetry is not sent on the very first run. To disable reporting of telemetry, run this terminal command:

dart --disable-analytics

If you opt out of telemetry, an opt-out event will be sent, and then no further information will be sent. This data is collected in accordance with the Google Privacy Policy (https://policies.google.com/privacy).

( ● ) Generating app icons ⏳... (1.2s) Error on line 16, column 11: Invalid description in the "serious_python_android" pubspec on the "serious_python_platform_interface" dependency: "../serious_python_platform_interface" is a relative path, but this isn't a local pubspec. ╷ 16 │ path: ../serious_python_platform_interface │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ╵ [17:29:23] Deleting Flutter bootstrap directory C:\Users\jkloi\AppData\Local\Temp\flet_flutter_build_7mTireYBGZ Run subprocess: ['C:\flutter\bin\flutter.BAT', '--version'] [17:29:24] Error building Flet app - see the log of failed command above.

FeodorFitsner commented 3 months ago

It is fixed in Flet 0.23.1.

Please cleanup Cookiecutter cache before running flet build command.

On Windows:

rd /s /q %USERPROFILE%\.cookiecutters

On Mac/Linux:

rm -rf ~/.cookiecutters