flutter_plugin_device_apps icon indicating copy to clipboard operation
flutter_plugin_device_apps copied to clipboard

APK Release build failed

Open Marcel2508 opened this issue 4 years ago • 4 comments

Hi, I'm using the latest version of your library. But my release build seems to fail every time I try to build an apk. Here is the output:

AILURE: Build failed with an exception.                                
                                                                        
* What went wrong:                                                      
Execution failed for task ':screen_state:verifyReleaseResources'.       
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed                                    
     /Users/marcel/.gradle/caches/transforms-2/files-2.1/a528b13ac93e64cafa3d0480e2c93207/core-1.1.0/res/values/values.xml:142:5-173:25: AAPT: error: resource android:attr/fontVariationSettings not found.
                                                                        
     /Users/marcel/.gradle/caches/transforms-2/files-2.1/a528b13ac93e64cafa3d0480e2c93207/core-1.1.0/res/values/values.xml:142:5-173:25: AAPT: error: resource android:attr/ttcIndex not found.
                                                                        
                                                                        
* 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 5s                                                   
Running Gradle task 'assembleRelease'...                                
Running Gradle task 'assembleRelease'... Done                      66,5s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
Building plugin device_apps...
Running Gradle task 'assembleAarRelease'...                             
Running Gradle task 'assembleAarRelease'... Done                    2,1s


FAILURE: Build failed with an exception.

* What went wrong:
Task 'assembleAarRelease' not found in root project 'device_apps'.

* Try:
Run gradlew tasks to get a list of available tasks. 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 1s


The plugin device_apps could not be built due to the issue above.

Any Idea what is causing this?

Marcel2508 avatar Jul 09 '20 13:07 Marcel2508

The Debug-Build (with the Flutter debugger, to test on my device) seems to work properly btw...

flutter build apk --target-platform android-arm --debug works flutter build apk --target-platform android-arm --release wont

Marcel2508 avatar Jul 09 '20 13:07 Marcel2508

I am facing the same problem.

pulkit0795 avatar Jul 17 '20 14:07 pulkit0795

Please ensure to follow this guide: https://flutter.dev/docs/development/androidx-migration

g123k avatar Jul 18 '20 06:07 g123k

Any update on this?

g123k avatar Mar 06 '21 19:03 g123k