0

I try to build my flutter project, last month it was fine when I was doing flutter build apk but when I do flutter build apk for now.. I get this error log

FAILURE: Build failed with an exception.                                
                                                                        
* What went wrong:                                                      
Could not determine the dependencies of task ':app:compileReleaseKotlin'.
> Could not resolve all task dependencies for configuration ':app:releaseCompileClasspath'.
   > Could not resolve com.google.android.gms:play-services-location:16.+.
     Required by:                                                       
         project :app > project :location                               
      > Failed to list versions for com.google.android.gms:play-services-location.
         > Unable to load Maven meta-data from https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml.
            > Could not get resource 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml'.
               > Could not GET 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml'. Received status code 403 from server: Forbidden
                                                                        
* 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 21s   

and here is build.gradle: https://gist.github.com/wahyu-handayani/b38f1cc491816c6dcfeb130ab42cdbef

and build.gradle inside android folder: https://gist.github.com/wahyu-handayani/2ab88f81869ef9a0e1575a465847e608 is there a way to solve this ?

wahyu
  • 1,679
  • 5
  • 35
  • 73
  • Please test it again by using VPN. Sometimes, because of sanctions this happens. ProtonVpn works well. – Hassan Alizadeh Jul 06 '21 at 05:00
  • see this: https://stackoverflow.com/a/63567112/11675817 – M Karimi Jul 06 '21 at 05:01
  • Please share your build.gradle file. also check your network connectivity,VPN and then try to build once again. – Devraj Jul 06 '21 at 05:02
  • @MKarimi, I have tried it but I still get the same error – wahyu Jul 06 '21 at 05:06
  • try Invalidate caches/restart android studio – M Karimi Jul 06 '21 at 05:09
  • this is your app level build gradle. please share another one. – Devraj Jul 06 '21 at 05:15
  • @Devraj I never edit ``` flutterVersionCode = localProperties.getProperty('flutter.versionCode')```, so it was there for the first time I create the project... and about gradle.version, where should I check it ? I am so sorry, for asking you many questions – wahyu Jul 06 '21 at 05:15
  • @Devraj I have edited my question by adding another build.gradle – wahyu Jul 06 '21 at 05:17
  • Please change your gradle to 3.5.0 and run your app with stable internet connection classpath 'com.android.tools.build:gradle:3.5.0' – Devraj Jul 06 '21 at 05:27
  • @Devraj I have tried it just now and I get another error Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'. Here is the full log https://gist.github.com/wahyu-handayani/94d3cbdcfa48b42cdc9205da8605753e – wahyu Jul 06 '21 at 05:36

0 Answers0