Unable to build an apk in flutter - flutter

I am trying to build an api from my flutter project, last month it was fine when I was doing flutter build apk, but not for now... I am not able to do that and here is the error log
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'.
> 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 33s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 34.3s
Gradle task assembleRelease failed with exit code 1
here is my android/build.gradle: https://gist.github.com/wahyu-handayani/959de3306aa1410c1b9b78ad927cc35c

Try to update your gradle wrapper to:
distributionUrl=https://services.gradle.org/distributions/gradle-6.7.1-all.zip

Related

flutter when i run the razor pay throw build error

i'm creating a payment gateway in my app using razor pay but app build faild
`FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugAssets'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not resolve com.razorpay:checkout:1.6.+.
Required by:
project :app > project :razorpay_flutter
> Failed to list versions for com.razorpay:checkout.
> Unable to load Maven meta-data from https://www.jitpack.io/com/razorpay/checkout/maven-metadata.xml.
> Could not GET 'https://www.jitpack.io/com/razorpay/checkout/maven-metadata.xml'. Received status code 521 from server:
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 53s
Exception: Gradle task assembleDebug failed with exit code 1`

Execution failed for task ':sign_in_with_apple:parseDebugLocalResources'. vscode

i tried to use the flutter stripe dependecy , then i had to upgrade gradle and kotlin i struggled a little they supposed to me to delete gradle-wrapper.jar,then it get created as damaged file, after that i am getting this error
Launching lib\main.dart on CPH2043 in debug mode...
lib\main.dart:1
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':sign_in_with_apple:parseDebugLocalResources'.
> Could not resolve all files for configuration ':sign_in_with_apple:androidApis'.
> Failed to transform android.jar to match attributes {artifactType=android-platform-attr, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
> Execution failed for PlatformAttrTransform: C:\Users\Dell\AppData\Local\Android\sdk\platforms\android-28\android.jar.
> C:\Users\Dell\AppData\Local\Android\sdk\platforms\android-28\android.jar
* 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 49s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
i tried flutter pub cache repair ,
i tried gradlew clean build ,
i desinstall and install flutter extention ,

Zendesk integration with Flutter

I am creating mobile app with flutter and I want to integrate Zendesk SDK using flutter as i have done research and i get to know that zendesk can not provide support to hybrid apps the only provide native SDK but still there are some plugins which provide support but its too older and not working for me below is the plugins which i have tried.
First Plugin
Second Plugin
Here is the code from second plugin
await Zendesk.initialize(<account key>, <application id>);
But I am not able to run app in android below is the error which i am facing
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
> Could not resolve com.zendesk:chat:3.1.0.
Required by:
project :app > project :zendesk_plugin
> Could not resolve com.zendesk:chat:3.1.0.
> Could not get resource 'https://google.bintray.com/exoplayer/com/zendesk/chat/3.1.0/chat-3.1.0.pom'.
> Could not HEAD 'https://google.bintray.com/exoplayer/com/zendesk/chat/3.1.0/chat-3.1.0.pom'. Received status code 502 from server: Bad Gateway
> Could not resolve com.zendesk:messaging:5.1.0.
Required by:
project :app > project :zendesk_plugin
> Could not resolve com.zendesk:messaging:5.1.0.
> Could not get resource 'https://google.bintray.com/exoplayer/com/zendesk/messaging/5.1.0/messaging-5.1.0.pom'.
> Could not HEAD 'https://google.bintray.com/exoplayer/com/zendesk/messaging/5.1.0/messaging-5.1.0.pom'. Received status code 502 from server: Bad Gateway
> Could not resolve com.zendesk:chat-providers:3.1.0.
Required by:
project :app > project :zendesk_plugin
> Could not resolve com.zendesk:chat-providers:3.1.0.
> Could not get resource 'https://google.bintray.com/exoplayer/com/zendesk/chat-providers/3.1.0/chat-providers-3.1.0.pom'.
> Could not HEAD 'https://google.bintray.com/exoplayer/com/zendesk/chat-providers/3.1.0/chat-providers-3.1.0.pom'. Received status code 502 from server: Bad Gateway
* 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 43s
Running Gradle task 'assembleDebug'...
[!] Gradle threw an error while downloading artifacts from the network. Retrying to download...
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
> Could not resolve com.zendesk:chat:3.1.0.
Required by:
project :app > project :zendesk_plugin
> Could not resolve com.zendesk:chat:3.1.0.
> Could not get resource 'https://google.bintray.com/exoplayer/com/zendesk/chat/3.1.0/chat-3.1.0.pom'.
> Could not HEAD 'https://google.bintray.com/exoplayer/com/zendesk/chat/3.1.0/chat-3.1.0.pom'. Received status code 502 from server: Bad Gateway
> Could not resolve com.zendesk:messaging:5.1.0.
Required by:
project :app > project :zendesk_plugin
> Could not resolve com.zendesk:messaging:5.1.0.
> Could not get resource 'https://google.bintray.com/exoplayer/com/zendesk/messaging/5.1.0/messaging-5.1.0.pom'.
> Could not HEAD 'https://google.bintray.com/exoplayer/com/zendesk/messaging/5.1.0/messaging-5.1.0.pom'. Received status code 502 from server: Bad Gateway
> Could not resolve com.zendesk:chat-providers:3.1.0.
Required by:
project :app > project :zendesk_plugin
> Could not resolve com.zendesk:chat-providers:3.1.0.
> Could not get resource 'https://google.bintray.com/exoplayer/com/zendesk/chat-providers/3.1.0/chat-providers-3.1.0.pom'.
> Could not HEAD 'https://google.bintray.com/exoplayer/com/zendesk/chat-providers/3.1.0/chat-providers-3.1.0.pom'. Received status code 502 from server: Bad Gateway
* 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 12s
[!] Gradle threw an error while downloading artifacts from the network. Retrying to download...
Exception: Gradle task assembleDebug failed with exit code 1
can any one please tell me how to solve this or any other way to integrate Zendesk with flutter
Thanks

Flutter build apk: Could not resolve all artifacts for configuration ':classpath'

I installed flutter a few moments ago but I get this error when I want to run the flutter project:
Building with sound null safety
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find com.android.tools.build:gradle:4.1.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.1.0/gradle-4.1.0.pom
- https://jcenter.bintray.com/com/android/tools/build/gradle/4.1.0/gradle-4.1.0.pom
Required by:
project :
* 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 5s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 6.9s
Gradle task assembleRelease failed with exit code 1
ScreenShot
Post your build gradle file. Most likely you added classpath 'com.android.tools.build:gradle:4.1.0 in the wrong place. it should be added to android/build.gradle and not to android/app/build.gradle
Should look like this:
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
.
.
.
}

Error when running the app, firebase_auth_oauth_web not found?

Plugin project :firebase_auth_oauth_web not found. Please update settings.gradle.
FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
Could not find com.google.firebase:fir55554ebase-bom:26.4.0.
Required by:
project :app
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 12s
Exception: Gradle task assembleDebug failed with exit code 1