I'm trying to run my flutter app on a real device but it gives me this error
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
Could not resolve io.flutter:arm64_v8a_debug:1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.
Required by:
project :app
> Could not resolve io.flutter:arm64_v8a_debug:1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.
> Could not get resource 'https://dl.google.com/dl/android/maven2/io/flutter/arm64_v8a_debug/1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408/arm64_v8a_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/io/flutter/arm64_v8a_debug/1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408/arm64_v8a_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom'.
> dl.google.com
> Could not resolve io.flutter:arm64_v8a_debug:1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.
> Could not get resource 'https://jcenter.bintray.com/io/flutter/arm64_v8a_debug/1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408/arm64_v8a_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom'.
> Could not GET 'https://jcenter.bintray.com/io/flutter/arm64_v8a_debug/1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408/arm64_v8a_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom'.
> jcenter.bintray.com
> Could not resolve io.flutter:arm64_v8a_debug:1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.
> Could not get resource 'http://download.flutter.io/io/flutter/arm64_v8a_debug/1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408/arm64_v8a_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom'.
> Could not GET 'http://download.flutter.io/io/flutter/arm64_v8a_debug/1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408/arm64_v8a_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom'.
> download.flutter.io
> Could not resolve io.flutter:arm64_v8a_debug:1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.
> Could not get resource 'http://download.flutter.io/io/flutter/arm64_v8a_debug/1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408/arm64_v8a_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom'.
> Could not GET 'http://download.flutter.io/io/flutter/arm64_v8a_debug/1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408/arm64_v8a_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom'.
> download.flutter.io
> Could not resolve io.flutter:arm64_v8a_debug:1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.
> Could not get resource 'http://download.flutter.io/io/flutter/arm64_v8a_debug/1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408/arm64_v8a_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom'.
> Could not GET 'http://download.flutter.io/io/flutter/arm64_v8a_debug/1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408/arm64_v8a_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom'.
> download.flutter.io
if anybody knows how to fix it please help.
> Could not GET 'http://
suggests that your internet is not working as expected. Maybe you are using a vpn? In that case, suspend it for a few minutes. If not, it is another internet related issue...
I had a similar issue:
$ flutter run
Running "flutter pub get" in flutter_sample... 886ms
Launching lib/main.dart on SM G955F in debug mode...
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 resolve io.flutter:flutter_embedding_debug:1.0.0-5d8bf811b3072390933d69f3e289a4bb673636c4.
Required by:
project :app
> Skipped due to earlier error
> Skipped due to earlier error
> Could not resolve io.flutter:arm64_v8a_debug:1.0.0-5d8bf811b3072390933d69f3e289a4bb673636c4.
Required by:
project :app
> Skipped due to earlier error
> Skipped due to earlier error
* 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 35s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 97.9s
the solution was:
Upgrade Gradle distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
Upgrade to dependency com.android.tools.build:gradle:4.1.0 in build.gradle
Related
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
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
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'
.
.
.
}
[Fatal Error] gradle-3.5.0.pom:2:1: Content is not allowed in prolog.
FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring project ':flutter_plugin_android_lifecycle'.
Could not resolve all artifacts for configuration ':flutter_plugin_android_lifecycle:classpath'.
Could not resolve com.android.tools.build:gradle:3.5.0.
Required by:
project :flutter_plugin_android_lifecycle
> Could not resolve com.android.tools.build:gradle:3.5.0.
> Could not parse POM https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.pom
> Content is not allowed in prolog.
Could not get unknown property 'android' for project ':flutter_plugin_android_lifecycle' of type org.gradle.api.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 1m 27s Exception: Gradle task assembleDebug failed
with exit code 1
Just Go to Your Project root Folder ,
than go to Android -> Gradle -> Delete Gradle FOlder
Now Restart the Project . It will solve your Problem
No errors when flutter doctor command was executed. I tried with updating Gradle with the latest version 6.4 and setting at env variable path as well, in the dist folder as well it is showing correctly.
gradle-wrapper.properties
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4-bin.zip
android/app/build.gradle
- compileSdkVersion 28
- targetSdkVersion 28
android/build.gradle
google() is added to allprojects and buildscript.repositories
I tried all approaches mentioned in similar kind of queries in StackOverflow and other platforms but of no use, I am totally stuck here.
how to resolve this error?
On flutter run command following ERROR is what I get:
Running Gradle task 'assembleDebug'...
[Fatal Error] aapt2-3.5.0-5435860.pom:2:1: Content is not allowed in prolog.**
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Could not resolve all files for configuration ':app:_internal_aapt2_binary'.
> Could not resolve com.android.tools.build:aapt2:3.5.0-5435860.
Required by:
project :app
> Could not resolve com.android.tools.build:aapt2:3.5.0-5435860.
> Could not parse POM https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2/3.5.0-5435860/aapt2-3.5.0-5435860.pom
> Content is not allowed in prolog.
* 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 6m 22s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 401.6s (!)
Exception: Gradle task assembleDebug failed with exit code 1