Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flet build with flet-build-template can't work #3949

Closed
1 task done
html5syt opened this issue Sep 7, 2024 · 1 comment
Closed
1 task done

flet build with flet-build-template can't work #3949

html5syt opened this issue Sep 7, 2024 · 1 comment

Comments

@html5syt
Copy link

html5syt commented Sep 7, 2024

Duplicate Check

Describe the bug

These days, I tried to use Github Actions to build Flet app. And all run properly if I don't use flet-build-template.
But when I follow the #2868 to custom signature, it started to error (All Builds .../ #12 配置签名等):

FAILURE: Build failed with an exception.

* What went wrong:
Could not open cp_settings generic class cache for settings file '/tmp/flet_flutter_build_a3wDZNSPpJ/android/settings.gradle' (/home/runner/.gradle/caches/7.5/scripts/5bahl4yp5mw7lcn2efkltdtgf).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 65

* 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.

* Get more help at https://help.gradle.org/

BUILD FAILED in 9s
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.

Next, I changed gradle version to 8.4 and 8.5 in gradle-wrapper.properties and tried again, but raise another error (#14 ffff):

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':package_info_plus:compileReleaseJavaWithJavac'.
> Could not resolve all files for configuration ':package_info_plus:androidJdkImage'.
   > Failed to transform core-for-system-modules.jar to match attributes {artifactType=_internal_android_jdk_image, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
      > Execution failed for JdkImageTransform: /usr/local/lib/android/sdk/platforms/android-34/core-for-system-modules.jar.
         > Error while executing process /usr/lib/jvm/temurin-21-jdk-amd64/bin/jlink with arguments {--module-path /home/runner/.gradle/caches/transforms-3/9d824bdb0d174f5cb08013d868c9bda3/transformed/output/temp/jmod --add-modules java.base --output /home/runner/.gradle/caches/transforms-3/9d824bdb0d174f5cb08013d868c9bda3/transformed/output/jdkImage --disable-plugin system-modules}

* 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.
> Get more help at https://help.gradle.org./

BUILD FAILED in 3m 1s
Running Gradle task 'assembleRelease'...                          183.4s
Gradle task assembleRelease failed with exit code 1
[09:33:26] Deleting Flutter bootstrap directory                                 
           /tmp/flet_flutter_build_0cPoQdV4uh                                   
           Error building Flet app - see the log of failed command above.       
           Run subprocess:                                                      
           ['/opt/hostedtoolcache/flutter/stable-3.24.0-x64/bin/flutter',       
           '--version']                                                         
           Run subprocess:                                                      
           ['/opt/hostedtoolcache/flutter/stable-3.24.0-x64/bin/flutter',       
           'doctor']                                                            
[09:33:29] Doctor summary (to see all details, run flutter doctor -v):          
           [✓] Flutter (Channel stable, 3.24.0, on Ubuntu 22.04.4 LTS           
           6.5.0-1025-azure, locale C.UTF-8)                                    
           [!] Android toolchain - develop for Android devices (Android SDK     
           version 35.0.0)                                                      
               ! Some Android licenses not accepted. To resolve this, run:      
           flutter doctor --android-licenses                                    
           [✓] Chrome - develop for the web                                     
           [✗] Linux toolchain - develop for Linux desktop                      
               ✗ ninja is required for Linux development.                       
                 It is likely available from your distribution (e.g.: apt       
           install ninja-build), or can be downloaded from                      
           https://github.com/ninja-build/ninja/releases                        
               ✗ GTK 3.0 development libraries are required for Linux           
           development.                                                         
                 They are likely available from your distribution (e.g.: apt    
           install libgtk-3-dev)                                                
           [!] Android Studio (not installed)                                   
           [✓] Connected device (2 available)                                   
           [✓] Network resources                                                
                                                                                
           ! Doctor found issues in 3 categories.                               
                                                                                
Error: Process completed with exit code 1.

After this, I changed Java to 18 and gradle to 7.5, and it can build sucessfully with custom sign. But when I install it to my Android 10 phone, Instead of showing the normal app interface, it keeps a white/black screen after the splash activity is displayed (depending on whether dark mode is enabled, worked fine in the last successful build apk, tested the project itself using the Android flet app and had no errors).

You can find this (maybe crashed) apk in #24 workflows, and this is direct link.

And it's "last successful build apk" in workflow #11: Link


In passing, I can't change my app name from "phiname" to "PhiName" (in PRODUCT_NAME env)

Code sample

you can see any Code on html5syt/phiname repository, including github actions run log.

Operating System

Linux

Operating system details

Ubuntu-latest (Github Actions)

Flet version

0.24.1

Regression

No, it isn't

@html5syt
Copy link
Author

html5syt commented Sep 7, 2024

please ignore it,sorry

@html5syt html5syt closed this as not planned Won't fix, can't repro, duplicate, stale Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant