Skip to content
This repository was archived by the owner on Dec 24, 2025. It is now read-only.
This repository was archived by the owner on Dec 24, 2025. It is now read-only.

Couldn't build APK. #1

@tct123

Description

@tct123

I got the following error when i tried to build an apk:

[22:18:56] Flutter 3.27.4 installed ✅                                                                                                   
           JDK installed ✅                                                                                                              
           Android SDK installed ✅                                                                                                      
[22:18:58] Created Flutter bootstrap project from gh:flet-dev/flet-build-template with ref "0.27.6" ✅                                   
[22:19:50] Packaged Python app ✅                                                                                                        
           Registered Flutter user extensions ✅                                                                                         
[22:19:51] Customized app icons ✅                                                                                                       
[22:20:00] Generated app icons ✅                                                                                                        
           Customized app splash images ✅                                                                                               
[22:20:08] Generated splash screens ✅                                                                                                   
[22:22:12] Resolving dependencies...                                                                                                     
           Downloading packages...                                                                                                       
             archive 3.6.1 (4.0.4 available)                                                                                             
             audioplayers 5.2.1 (6.4.0 available)                                                                                        
             audioplayers_android 4.0.3 (5.2.0 available)                                                                                
             audioplayers_darwin 5.0.2 (6.2.0 available)                                                                                 
             audioplayers_linux 3.1.0 (4.2.0 available)                                                                                  
             audioplayers_platform_interface 6.1.0 (7.1.0 available)                                                                     
             audioplayers_web 4.1.0 (5.1.0 available)                                                                                    
             audioplayers_windows 3.1.0 (4.2.0 available)                                                                                
             characters 1.3.0 (1.4.0 available)                                                                                          
             clock 1.1.1 (1.1.2 available)                                                                                               
             collection 1.19.0 (1.19.1 available)                                                                                        
             device_info_plus 11.3.0 (11.3.3 available)                                                                                  
             ffi 2.1.3 (2.1.4 available)                                                                                                 
             file_picker 8.3.7 (9.1.0 available)                                                                                         
             fl_chart 0.69.2 (0.70.2 available)                                                                                          
           ! flet 0.27.6 (overridden)                                                                                                    
             flutter_lints 2.0.3 (5.0.0 available)                                                                                       
             flutter_native_splash 2.4.4 (2.4.5 available)                                                                               
             image 4.3.0 (4.5.3 available)                                                                                               
             intl 0.19.0 (0.20.2 available)                                                                                              
             js 0.6.7 (0.7.2 available)                                                                                                  
             lints 2.1.1 (5.1.1 available)                                                                                               
             material_color_utilities 0.11.1 (0.12.0 available)                                                                          
             meta 1.15.0 (1.16.0 available)                                                                                              
             path 1.9.0 (1.9.1 available)                                                                                                
             petitparser 6.0.2 (6.1.0 available)                                                                                         
             sensors_plus 4.0.2 (6.1.1 available)                                                                                        
             sensors_plus_platform_interface 1.2.0 (2.0.1 available)                                                                     
             synchronized 3.3.0+3 (3.3.1 available)                                                                                      
             toml 0.15.0 (0.16.0 available)                                                                                              
             url_strategy 0.2.0 (discontinued)                                                                                           
           ! wakelock_plus 1.2.10 (overridden)                                                                                           
           ! web 1.1.1 (overridden)                                                                                                      
             web_socket_channel 2.4.5 (3.0.2 available)                                                                                  
           ! webview_flutter_android 4.3.3 (overridden)                                                                                  
             win32 5.10.1 (5.12.0 available)                                                                                             
             win32_registry 1.1.5 (2.1.0 available)                                                                                      
           ! window_manager 0.4.3 (overridden)                                                                                           
           Got dependencies!                                                                                                             
           1 package is discontinued.                                                                                                    
           33 packages have newer versions incompatible with dependency constraints.                                                     
           Try `flutter pub outdated` for more information.                                                                              
                                                                                                                                         
           Running Gradle task 'assembleRelease'...                                                                                      
           Gradle build config:                                                                                                          
             minSdkVersion: 21                                                                                                           
             targetSdkVersion: 35                                                                                                        
             versionCode: 1                                                                                                              
             versionName: 0.1.0                                                                                                          
           Font asset "CupertinoIcons.ttf" was tree-shaken, reducing it from 257628 to 209160 bytes (18.8% reduction). Tree-shaking can  
           be disabled by providing the --no-tree-shake-icons flag when building your app.                                               
           Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from 1645184 to 1261080 bytes (23.3% reduction).          
           Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.                              
           Running Gradle task 'assembleRelease'...                          119,3s                                                      
                                                                                                                                         
           ┌─ Flutter Fix ─────────────────────────────────────────────────────────────────────────────────┐                             
           │ The plugin torch_light requires a higher Android SDK version.                                 │                             
           │ Fix this issue by adding the following to the file                                            │                             
           │ /home/anonym/Dokumente/GitHub/Flet-Portfolio/build/flutter/android/app/build.gradle:          │                             
           │ android {                                                                                     │                             
           │   defaultConfig {                                                                             │                             
           │     minSdkVersion 23                                                                          │                             
           │   }                                                                                           │                             
           │ }                                                                                             │                             
           │                                                                                               │                             
           │ Following this change, your app will not be available to users running Android SDKs below 23. │                             
           │ Consider searching for a version of this plugin that supports these lower versions of the     │                             
           │ Android SDK instead.                                                                          │                             
           │ For more information, see: https://flutter.dev/to/review-gradle-config                        │                             
           └───────────────────────────────────────────────────────────────────────────────────────────────┘                             
                                                                                                                                         
           /home/anonym/Dokumente/GitHub/Flet-Portfolio/build/flutter/android/app/src/main/AndroidManifest.xml Error:                    
                   uses-sdk:minSdkVersion 21 cannot be smaller than version 23 declared in library [:torch_light]                        
           /home/anonym/Dokumente/GitHub/Flet-Portfolio/build/flutter/build/torch_light/intermediates/merged_manifest/release/processRele
           aseManifest/AndroidManifest.xml as the library might be using APIs not available in 21                                        
                   Suggestion: use a compatible library with a minSdk of at most 21,                                                     
                           or increase this project's minSdk version to at least 23,                                                     
                           or use tools:overrideLibrary="com.svprdga.torchlight" to force usage (may lead to runtime failures)           
                                                                                                                                         
           FAILURE: Build failed with an exception.                                                                                      
                                                                                                                                         
           * What went wrong:                                                                                                            
           Execution failed for task ':app:processReleaseMainManifest'.                                                                  
           > Manifest merger failed : uses-sdk:minSdkVersion 21 cannot be smaller than version 23 declared in library [:torch_light]     
           /home/anonym/Dokumente/GitHub/Flet-Portfolio/build/flutter/build/torch_light/intermediates/merged_manifest/release/processRele
           aseManifest/AndroidManifest.xml as the library might be using APIs not available in 21                                        
                   Suggestion: use a compatible library with a minSdk of at most 21,                                                     
                           or increase this project's minSdk version to at least 23,                                                     
                           or use tools:overrideLibrary="com.svprdga.torchlight" to force usage (may lead to runtime failures)           
                                                                                                                                         
           * 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 1m 58s                                                                                                        
           Gradle task assembleRelease failed with exit code 1                                                                           
                                                                                                                                         
[22:24:29] Doctor summary (to see all details, run flutter doctor -v):                                                                   
           [✓] Flutter (Channel stable, 3.27.4, on Fedora Linux 41 (KDE Plasma) 6.13.6-200.fc41.x86_64, locale de_DE.UTF-8)              
           [✓] Android toolchain - develop for Android devices (Android SDK version 35.0.1)                                              
           [✓] Chrome - develop for the web                                                                                              
           [✓] Linux toolchain - develop for Linux desktop                                                                               
           [!] Android Studio (version unknown)                                                                                          
               ✗ Unable to determine Android Studio version.                                                                             
           [✓] Connected device (2 available)                                                                                            
           [✓] Network resources                                                                                                         
                                                                                                                                         
           ! Doctor found issues in 1 category.                                                                                          
                                                                                                                                         
╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Error building Flet app - see the log of failed command above.                                                                        │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Building other flet apps worked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions