Description
Description
In flet 0.20, I encountered an error when creating the APK file, whereas in flet 0.19, the APK was successfully built. However, upon running the APK, another error occurred.
App is correctly working on Windows.
Error Log for flet 0.20-----------------------------------------------------------------------
Creating Flutter bootstrap project...OK
Customizing app icons and splash images...OK
Generating app icons...OK
Generating splash screens...OK
Packaging Python app...OK
Building .apk for Android...Resolving dependencies...
ffi 2.1.0 (2.1.2 available)
fl_chart 0.65.0 (0.66.2 available)
flutter_lints 2.0.3 (3.0.1 available)
flutter_native_splash 2.3.7 (2.3.11 available)
http 1.2.0 (1.2.1 available)
js 0.6.7 (0.7.1 available)
lints 2.1.1 (3.0.0 available)
matcher 0.12.16 (0.12.16+1 available)
material_color_utilities 0.5.0 (0.8.0 available)
meta 1.10.0 (1.12.0 available)
package_info_plus 4.2.0 (5.0.1 available)
path 1.8.3 (1.9.0 available)
petitparser 5.4.0 (6.0.2 available)
test_api 0.6.1 (0.7.0 available)
toml 0.14.0 (0.15.0 available)
web 0.3.0 (0.5.0 available)
web_socket_channel 2.4.0 (2.4.4 available)
xml 6.3.0 (6.5.0 available)
Got dependencies!
18 packages have newer versions incompatible with dependency constraints.
Try flutter pub outdated
for more information.
Running Gradle task 'assembleRelease'...
Warning: The plugin url_launcher_android requires Android SDK version 34.
For more information about build configuration, see https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
Running Gradle task 'assembleRelease'... 65,6s
One or more plugins require a higher Android SDK version.
Fix this issue by adding the following to C:\Users\SSosa\AppData\Local\Temp\flet_flutter_build_EwbtIwDTyO\android\app\build.gradle:
android {
compileSdkVersion 34
...
}
C:\Users\SSosa\AppData\Local\Android\sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\bin\llvm-strip.exe: error: 'C:\Users\SSosa\AppData\Local\Temp\flet_flutter_build_EwbtIwDTyO\build\serious_python_android\intermediates\merged_native_libs\release\out\lib\armeabi-v7a\libpythonbundle.so': The file was not
recognized as a valid object file
C:\Users\SSosa\AppData\Local\Android\sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\bin\llvm-strip.exe: error: 'C:\Users\SSosa\AppData\Local\Temp\flet_flutter_build_EwbtIwDTyO\build\serious_python_android\intermediates\merged_native_libs\release\out\lib\arm64-v8a\libpythonbundle.so': The file was not recognized
as a valid object file
C:\Users\SSosa\AppData\Local\Android\sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\bin\llvm-strip.exe: error: 'C:\Users\SSosa\AppData\Local\Temp\flet_flutter_build_EwbtIwDTyO\build\serious_python_android\intermediates\merged_native_libs\release\out\lib\x86_64\libpythonbundle.so': The file was not recognized as
a valid object file
../../Pub/Cache/hosted/pub.dev/flet-0.20.1/lib/src/utils/text.dart:156:8: Error: 'FontVariation' isn't a type.
List? variations;
^^^^^^^^^^^^^
../../Pub/Cache/hosted/pub.dev/flet-0.20.1/lib/src/utils/text.dart:158:19: Error: Method not found: 'FontVariation'.
variations = [FontVariation('wght', parseDouble(fontWeight.substring(1)))];
^^^^^^^^^^^^^
../../Pub/Cache/hosted/pub.dev/flet-0.20.1/lib/src/controls/cupertino_textfield.dart:54:40: Error: The getter 'isShiftPressed' isn't defined for the class 'HardwareKeyboard'.
- 'HardwareKeyboard' is from 'package:flutter/src/services/hardware_keyboard.dart' ('/C:/flutter/packages/flutter/lib/src/services/hardware_keyboard.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'isShiftPressed'.
if (!HardwareKeyboard.instance.isShiftPressed &&
^^^^^^^^^^^^^^
../../Pub/Cache/hosted/pub.dev/flet-0.20.1/lib/src/controls/page.dart:219:61: Error: The getter 'isAltPressed' isn't defined for the class 'HardwareKeyboard'. - 'HardwareKeyboard' is from 'package:flutter/src/services/hardware_keyboard.dart' ('/C:/flutter/packages/flutter/lib/src/services/hardware_keyboard.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'isAltPressed'.
isAltPressed: HardwareKeyboard.instance.isAltPressed,
^^^^^^^^^^^^
../../Pub/Cache/hosted/pub.dev/flet-0.20.1/lib/src/controls/page.dart:221:51: Error: The getter 'isControlPressed' isn't defined for the class 'HardwareKeyboard'. - 'HardwareKeyboard' is from 'package:flutter/src/services/hardware_keyboard.dart' ('/C:/flutter/packages/flutter/lib/src/services/hardware_keyboard.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'isControlPressed'.
HardwareKeyboard.instance.isControlPressed,
^^^^^^^^^^^^^^^^
../../Pub/Cache/hosted/pub.dev/flet-0.20.1/lib/src/controls/page.dart:222:63: Error: The getter 'isShiftPressed' isn't defined for the class 'HardwareKeyboard'. - 'HardwareKeyboard' is from 'package:flutter/src/services/hardware_keyboard.dart' ('/C:/flutter/packages/flutter/lib/src/services/hardware_keyboard.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'isShiftPressed'.
isShiftPressed: HardwareKeyboard.instance.isShiftPressed,
../../Pub/Cache/hosted/pub.dev/flet-0.20.1/lib/src/controls/page.dart:223:62: Error: The getter 'isMetaPressed' isn't defined for the class 'HardwareKeyboard'. - 'HardwareKeyboard' is from 'package:flutter/src/services/hardware_keyboard.dart' ('/C:/flutter/packages/flutter/lib/src/services/hardware_keyboard.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'isMetaPressed'.
isMetaPressed: HardwareKeyboard.instance.isMetaPressed)
^^^^^^^^^^^^^
../../Pub/Cache/hosted/pub.dev/flet-0.20.1/lib/src/controls/text.dart:72:12: Error: 'FontVariation' isn't a type.
List variations = [];
../../Pub/Cache/hosted/pub.dev/flet-0.20.1/lib/src/controls/text.dart:75:18: Error: The method 'FontVariation' isn't defined for the class 'TextControl'. - 'TextControl' is from 'package:flet/src/controls/text.dart' ('../../Pub/Cache/hosted/pub.dev/flet-0.20.1/lib/src/controls/text.dart').
eyboard'. - 'HardwareKeyboard' is from 'package:flutter/src/services/hardware_keyboard.dart' ('/C:/flutter/packages/flutter/lib/src/services/hardware_keyboard.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'isShiftPressed'. eyboard'.
if (!HardwareKeyboard.instance.isShiftPressed && ).
^^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
Error log flet 0.19 on android device -----------------------------------------------------------------------
Traceback (most recent call last):
File "", line 40, in
File "", line 229, in run_module
File "", line 88, in run_code
File "C:\Users\SSosa\AppData\Local\Temp\serious_python_temp89325f1b\main.py", line 394, in
File "C:\Users\SSosa\AppData\Local\Temp\serious_python_temp89325f1b_pypackages\flet_runtime\app.py", line 91, in app
File "C:\Users\SSosa\AppData\Local\Temp\serious_python_temp89325f1b_pypackages_\flet_runtime\app.py", line 128, in _app_sync
File "C:\Users\SSosa\AppData\Local\Temp\serious_python_temp89325f1b_pypackages\flet_runtime\app.py", line 385, in connect_internal_sync
File "C:\Users\SSosa\AppData\Local\Temp\serious_python_temp89325f1b_pypackages\flet_runtime\sync_local_socket_connection.py", line 72, in connect
File "C:\Users\SSosa\AppData\Local\Temp\serious_python_temp89325f1b_pypackages\flet_runtime\sync_local_socket_connection.py", line 158, in _connection_loop
File "C:\Users\SSosa\AppData\Local\Temp\serious_python_temp89325f1b_pypackages\flet_runtime\sync_local_socket_connection.py", line 82, in __on_message
TypeError: RegisterWebClientRequestPayload.init() missing 1 required positional argument: 'media'