flutter: can not build android apk

前端 未结 9 2406
心在旅途
心在旅途 2020-12-16 18:35
FAILURE: Build failed with an exception.
  • What went wrong: Execution failed for task \':app:lintVitalRelease\'.

    Coul

9条回答
  •  眼角桃花
    2020-12-16 19:14

    I have found a solution mentioned here

    I got this problem in Android Studio 4.0 when I did a Gradle sync. I fixed it by doing the following:

    1. Open top-level build.gradle and change the gradle classpath to:

      classpath 'com.android.tools.build:gradle:4.0.0'
      
    2. Open gradle\wrapper\gradle-wrapper.properties and change the distribution URL to:

      distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
      
    3. Copy in .idea\jarRepositories.xml from a new project

    Here's my new flutter project jarRepositories.xml, you can get your own.

    
    
      
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
      
    
    

    No idea how or why, but it worked for me

提交回复
热议问题