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.
Related
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
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.7/userguide/command_line_interface.html#sec:command_line_warnings
FAILURE: Build failed with an exception.
Where:
Build file '/home/kashi/React Native/taajfoodmobile/node_modules/#stripe/stripe-react-native/android/build.gradle' line: 29
What went wrong:
A problem occurred evaluating project ':stripe_stripe-react-native'.
No signature of method: build_526hb1oh4bfs3lomhun33ieeh.android() is applicable for argument types: (build_526hb1oh4bfs3lomhun33ieeh$_run_closure1) values: [build_526hb1oh4bfs3lomhun33ieeh$_run_closure1#23e66cbe]
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
buildFeatures used in stripe-react-native SDK is available from Gradle plugin >= 4.x versions only.
Please refer to this GitHub issue https://github.com/stripe/stripe-react-native/issues/203 for details.
FAILURE: Build failed with an exception.
Where:
Build file '/home/jhondev/Android/myapp/android/app/build.gradle' line: 158
What went wrong:
A problem occurred evaluating project ':app'.
Could not find method compile() for arguments [project ':react-native-google-places'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
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.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 2s
error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: ./gradlew app:installDebug. Run CLI with --verbose flag for more details.
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?
Expected file collection to contain exactly one file, however, it contains more than one file.
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.
1)Clean and Rebuild project should work. It works for me
2)Try: invalidate caches/Restart