每日前端
大道至简

flutter build apk报错解决

  • 开启压缩后,flutter build apk报错:

    The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app. See https://goo.gl/CP92wY for more information on the problem and how to fix it.

    升级AndroidX仍然报错,发现是开启压缩的问题,把android/app/build.gradle里面的压缩这句去掉就可以了

    ...
        buildTypes {
            release {
                ...
                // minifyEnabled true
                ...
            }
        }
    ...
    ...
    
    Warning: Exception while processing task java.io.IOException: Please correct the above warnings first.
    Thread(Tasks limiter_1): destruction                                    
                                                                            
    FAILURE: Build failed with an exception.                                
                                                                            
    * What went wrong:                                                      
    Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
    > Job failed, see logs for details                                      
                                                                            
    * 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 26s                                                     
    Running Gradle task 'assembleRelease'...                                
    Running Gradle task 'assembleRelease'... Done                      26.5s
    *******************************************************************************************
    The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
    See https://goo.gl/CP92wY for more information on the problem and how to fix it.
    *******************************************************************************************
    Gradle task assembleRelease failed with exit code 1
未经允许不得转载:每日前端 » flutter build apk报错解决
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

一个更全的前端开发资源库

立即前往