I have a React Native app, which works fine on emulators. I'm trying to build its APK file. I followed this tutorial for the same.
However when I run the command ./gradlew assembleRelease I get this error:
FAILURE: Build failed with an exception.
* What went wrong: Could not determine the dependencies of task ':app:lintVitalRelease'.
> Could not resolve all task dependencies for configuration ':app:lintClassPath'.
> Could not resolve com.android.tools.lint:lint-gradle:26.5.3.
Required by:
project: app
> Could not resolve com.android.tools.lint:lint-gradle:26.5.3.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle/26.5.3/lint-gradle-26.5.3.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-gradle/26.5.3/lint-gradle-26.5.3.pom'.
> Connect to dl.google.com:443 [dl.google.com/2404:6800:4009:80a:0:0:0:200e] failed: Network is unreachable (connect failed)
* 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 8s
I searched around for the solution and found this StackOverflow question, whose answer provides the pom file.
But I don't know where to put it.
How do I resolve this error?
Related
Yesterday I run my code and didn't get any error but just so sudden... (I didn't edit my code) I got an error log like this
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':app:debugCompileClasspath'.
> Could not resolve com.google.android.gms:play-services-location:[15.0.0, 16.0.0).
Required by:
project :app
> 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 8s
I have tried by running it using another internet connection and still I get the same result. Is there a way to solve this (this error only happen when I run it using android and run so well in ios simulator)
I am stuck at the below issue for quite some time and its not getting resolved, had searched across stack overflow, google, but nothing is working for me. There's a workaround suggested on ionic portal, that too is not working. Please help me to resolve the issue.
I have tried to add google-services.json in android/app directory, then the 2nd issue comes, then why I tried to add the same file android/capacitor-cordova-android-plugins directory, then another issue comes stating:
Execution failed for task ':capacitor-cordova-android-plugins:processDebugGoogleServices'. No matching client found for package name 'capacitor.android.plugins'
Below is the original issue, when google-services.json, is not placed anywhere.
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it.
Searched Location:
/Users/xxxx/development/projects/appName/android/app/google-services.json
/Users/xxxx/development/projects/appName/android/app/src/nullnull/google-services.json
/Users/xxxx/development/projects/appName/android/app/src/debug/google-services.json
/Users/xxxx/development/projects/appName/android/app/src/nullnullDebug/google-services.json
/Users/xxxx/development/projects/appName/android/app/src/nullnull/debug/google-services.json
/Users/xxxx/development/projects/appName/android/app/src/debug/nullnull/google-services.json
* 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':capacitor-cordova-android-plugins:processDebugGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it.
Searched Location:
/Users/xxxx/development/projects/appName/android/capacitor-cordova-android-plugins/google-services.json
/Users/xxxx/development/projects/appName/android/capacitor-cordova-android-plugins/src/nullnull/google-services.json
/Users/xxxx/development/projects/appName/android/capacitor-cordova-android-plugins/src/debug/google-services.json
/Users/xxxx/development/projects/appName/android/capacitor-cordova-android-plugins/src/nullnullDebug/google-services.json
/Users/xxxx/development/projects/appName/android/capacitor-cordova-android-plugins/src/nullnull/debug/google-services.json
/Users/xxxx/development/projects/appName/android/capacitor-cordova-android-plugins/src/debug/nullnull/google-services.json
* 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/7.0/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 3s
118 actionable tasks: 22 executed, 96 up-to-date
I'am trying to generate APK from terminal so first i started with ./gradlew build but i've got this error and can't find any solution.
FAILURE: Build failed with an exception.
* What went wrong:
Could not evaluate onlyIf predicate for task ':library:signArchives'.
> path may not be null or empty string. path=''
* 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
Deprecated Gradle features were used in this build, making it
incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
BUILD FAILED in 11s
any help please.
I have implemented various methods but errors appear every time I run android.
If you delete the path_provier_macos folder, a linux error appears.
You are currently using path_provier: ^1.6.11. Lowering the path_provier version is the same.
Please tell me the solution.
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':path_provider:compileDebugAidl'.
> Could not resolve all task dependencies for configuration
':path_provider:debugCompileClasspath'.
> Could not resolve project :path_provider_macos.
Required by:
project :path_provider
> Unable to find a matching configuration of project :path_provider_macos:
- None of the consumable configurations have attributes.
> Could not resolve project :path_provider_linux.
Required by:
project :path_provider
> Unable to find a matching configuration of project :path_provider_linux:
- None of the consumable configurations have attributes.
* 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
Finished with error: Gradle task assembleDebug failed with exit code 1
Go to your Flutter sdk folder.
Go to [.pub-cache\hosted\pub.dartlang.org\ or .pub-cache\hosted\pub.flutter-io.cn\ ]
Remove all path_provider folders.
Pub get
Run your app.
I hope this fix your problem!
enter image description here
****When I run these bellow things are shown:**** this issue is occurring with all form Bangladesh
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-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32.
Required by:
project :app
> Could not resolve io.flutter:flutter_embedding_debug:1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32.
> Could not get resource
> Could not get resource 'https://storage.googleapis.com/download.flutter.io/io/flutter/x86_64_debug/1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32/x86_64_debug-1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32.pom'.
> Could not GET 'https://storage.googleapis.com/download.flutter.io/io/flutter/x86_64_debug/1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32/x86_64_debug-1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32.pom'.
> Remote host closed connection during handshake
* Try:
Run with --stack trace 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 41s
Exception: Gradle task assembly debug failed with exit code 1
It clearly says
Could not GET ...
Remote host closed connection during handshake
Maybe, check if your internet connection is available to the application who is trying to build.