Execution failed for task ':react-native-android-location-enabler:generateDebugRFile' - android

WARNING: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.5.3.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '23.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
Task :react-native-android-location-enabler:generateDebugRFile FAILED
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.3/userguide/command_line_interface.html#sec:command_line_warnings
10 actionable tasks: 2 executed, 8 up-to-date
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':react-native-android-location-enabler:generateDebugRFile'.
Could not resolve all files for configuration ':react-native-android-location-enabler:debugRuntimeClasspath'.
Failed to transform react-native-0.63.2.aar (com.facebook.react:react-native:0.63.2) to match attributes {artifactType=android-symbol-with-package-name, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for JetifyTransform: D:\react\reactNative\GeoWheelDriver-master\node_modules\react-native\android\com\facebook\react\react-native\0.63.2\react-native-0.63.2.aar.
> Failed to transform 'D:\react\reactNative\GeoWheelDriver-master\node_modules\react-native\android\com\facebook\react\react-native\0.63.2\react-native-0.63.2.aar' using Jetifier. Reason: invalid entry size (expected 939924 but got 939159 bytes). (Run with --stacktrace for more details.)
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 15s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

Try run yarn jetify
To migrate them to AndroidX? I really don't know. ๕๕๕

add this code to all projects { in android/build.gradle
def REACT_NATIVE_VERSION = new File(['node', '--print',"JSON.parse(require('fs').readFileSync(require.resolve('react-native/package.json'), 'utf-8')).version"].execute(null, rootDir).text.trim())
configurations.all {
resolutionStrategy {
force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION
}

Have a try with the below commands that might help you to resolve your issue with the react-native-android-location-enabler.
open Terminal
cd android
./gradlew clean
./graldew assembleRelease
The above commands will perform clean functionality for your Gradle and create a release build for you.
UPDATE
Try to remove your node_modules and install again.
Open Terminal
rm -rf node_modules
rm -rf yarn-lock.json
yarn install
If you are using npm as a package kindly use the required commands.

Related

Azure devops - SDK location not found. Define location with an ANDROID_SDK_ROOT environment

I get the below error while trying to run android application in a self hosted ubuntu agent. Am I getting this error because Android SDK is not present in the Ubuntu agent? If so, is there any workaround? I do not get this issue while the same app is run in a macos agent.
Any help is much appreciated
2022-07-28T23:36:24.0840286Z ##[section]Starting: Build Task
2022-07-28T23:36:24.0850273Z ==============================================================================
2022-07-28T23:36:24.0850626Z Task : Gradle
2022-07-28T23:36:24.0850911Z Description : Build using a Gradle wrapper script
2022-07-28T23:36:24.0851183Z Version : 3.205.0
2022-07-28T23:36:24.0851592Z Author : Microsoft Corporation
2022-07-28T23:36:24.0851981Z Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/build/gradle
2022-07-28T23:36:24.0852397Z ==============================================================================
2022-07-28T23:36:24.4320361Z ##[warning]Used 'chmod' method for gradlew file to make it executable.
2022-07-28T23:36:24.4933143Z [command]/azp/_work/1/s/gradlew assembleDebug
2022-07-28T23:36:25.2820472Z Starting a Gradle Daemon, 1 incompatible and 2 stopped Daemons could not be reused, use --status for details
2022-07-28T23:36:33.1825697Z
2022-07-28T23:36:33.1828123Z > Configure project :app
2022-07-28T23:36:33.1831681Z WARNING: DSL element 'android.dataBinding.enabled' is obsolete and has been replaced with 'android.buildFeatures.dataBinding'.
2022-07-28T23:36:33.1834823Z It will be removed in version 5.0 of the Android Gradle plugin.
2022-07-28T23:36:33.1836236Z VersionCode is set to 999
2022-07-28T23:36:33.1837886Z releaseVersion is set to 1.1.0
2022-07-28T23:36:33.2796793Z WARNING: DSL element 'android.dataBinding.enabled' is obsolete and has been replaced with 'android.buildFeatures.dataBinding'.
2022-07-28T23:36:33.2797944Z It will be removed in version 5.0 of the Android Gradle plugin.
2022-07-28T23:36:33.9796986Z
2022-07-28T23:36:33.9798819Z FAILURE: Build failed with an exception.
2022-07-28T23:36:33.9799385Z
2022-07-28T23:36:33.9799910Z * What went wrong:
2022-07-28T23:36:33.9801449Z A problem occurred configuring project ':app'.
2022-07-28T23:36:33.9802801Z > SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at '/azp/_work/1/s/local.properties'.
2022-07-28T23:36:33.9803386Z
2022-07-28T23:36:33.9803681Z * Try:
2022-07-28T23:36:33.9804986Z 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.
2022-07-28T23:36:33.9805350Z
2022-07-28T23:36:33.9805674Z * Get more help at https://help.gradle.org
2022-07-28T23:36:33.9806648Z
2022-07-28T23:36:33.9807103Z Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
2022-07-28T23:36:33.9807912Z Use '--warning-mode all' to show the individual deprecation warnings.
2022-07-28T23:36:33.9808507Z See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings
2022-07-28T23:36:33.9808801Z
2022-07-28T23:36:33.9809086Z BUILD FAILED in 9s
2022-07-28T23:36:34.4381110Z Error: The process '/azp/_work/1/s/gradlew' failed with exit code 1
2022-07-28T23:36:34.4386504Z at ExecState._setResult (/azp/_work/_tasks/Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4/3.205.0/node_modules/azure-pipelines-task-lib/toolrunner.js:944:25)
2022-07-28T23:36:34.4390433Z at ExecState.CheckComplete (/azp/_work/_tasks/Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4/3.205.0/node_modules/azure-pipelines-task-lib/toolrunner.js:927:18)
2022-07-28T23:36:34.4393277Z at ChildProcess.<anonymous> (/azp/_work/_tasks/Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4/3.205.0/node_modules/azure-pipelines-task-lib/toolrunner.js:840:19)
2022-07-28T23:36:34.4394910Z at ChildProcess.emit (events.js:198:13)
2022-07-28T23:36:34.4396280Z at maybeClose (internal/child_process.js:982:16)
2022-07-28T23:36:34.4397383Z at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
2022-07-28T23:36:34.4415403Z ##[error]Code analysis failed. Gradle exit code: -1. Error: Error: The process '/azp/_work/1/s/gradlew' failed with exit code 1
2022-07-28T23:36:34.4472252Z ##[section]Finishing: Build Task
SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at '/azp/_work/1/s/local.properties'.
The cause of this error is that the Android SDK is not installed or the Android environment is not configured on your self-hosted agent.
You need to check if Android SDK has been installed on your self-hosted agent.
If no, you can use the following command to install Android SDK.
sudo apt update && sudo apt install android-sdk
The location of Android SDK on Linux can be any of the following:
/home/AccountName/Android/Sdk
/usr/lib/android-sdk
/Library/Android/sdk/
/Users/[USER]/Library/Android/sdk
Then you can set the Android environment via setting environment variable or setting sdk.dir path in /azp/_work/1/s/local.properties.
For example:
Set environment variable
1.Edit your ~/.zshrc or ~/.bashrc or ...
2. Add SDK path:
export ANDROID_HOME=$HOME/Android/Sdk
export ANDROID_SDK_ROOT=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-tools
3.Run command:
source $HOME/.bashrc
echo $ANDROID_SDK_ROOT

Gradle assemble failing due to "Could not determine the dependencies of task ':app:lintVitalRelease'. "

I tried to make my ionic project into a .apk, following the below steps
$ ionic start
$ ionic build
$ ionic capacitor add android
$ ionic sync
$ cd android && ./gradlew assembleRelease
extra info
------------------------------------------------------------
Gradle 4.4.1
------------------------------------------------------------
Build time: 2012-12-21 00:00:00 UTC
Revision: none
Groovy: 2.4.16
Ant: Apache Ant(TM) version 1.10.5 compiled on August 27 2018
JVM: 10 ("Oracle Corporation" 10+44)
OS: Linux 5.4.119-14943-gff839c7fedcc amd64
after which I got the following error, how do I fix 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 androidx.appcompat:appcompat:1.2.0.
Required by:
project :app
> Could not resolve androidx.appcompat:appcompat:1.2.0.
> Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.2.0/appcompat-1.2.0.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.2.0/appcompat-1.2.0.pom'.
> The server may not support the client's requested TLS protocol versions: (TLSv1.2). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.0/userguide/build_environment.html#gradle_system_properties
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
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 18s

Appcenter Codepush integration. Cannot add task 'bundleDebugJsAndAssets' as a task with that name already exists

Steps to Reproduce
yarn add react-native-codepush
Add following to android/app/build.gradle
apply from: "../../node_modules/react-native/react.gradle"
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
Add following to MainApplication.java
...
import com.microsoft.codepush.react.CodePush;
...
#Override
protected String getJSBundleFile() {
return CodePush.getJSBundleFile();
}
Add the following to strings.xml
<string name="CodePushDeploymentKey" moduleConfig="true">MYKEY</string>
Expected Behavior
Build should be successful
Actual Behavior
What actually happens?
$ react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 998 file(s) to forward-jetify. Using 4 workers...
info JS server already running.
info Installing the app...
> Configure project :app
WARNING: BuildType(debug): resValue 'react_native_dev_server_port' value is being replaced: 8081 -> 8081
WARNING: BuildType(debug): resValue 'react_native_inspector_proxy_port' value is being replaced: 8081 -> 8081
WARNING: BuildType(release): resValue 'react_native_dev_server_port' value is being replaced: 8081 -> 8081
WARNING: BuildType(release): resValue 'react_native_inspector_proxy_port' value is being replaced: 8081 -> 8081
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.0.1/userguide/command_line_interface.html#sec:command_line_warnings
FAILURE: Build failed with an exception.
* Where:
Script '/Users/user/Desktop/project/app/native/node_modules/react-native/react.gradle' line: 118
* What went wrong:
A problem occurred configuring project ':app'.
> Cannot add task 'bundleDebugJsAndAssets' as a task with that name already exists.
* 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 4s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* Where:
Script '/Users/user/Desktop/project/app/native/node_modules/react-native/react.gradle' line: 118
* What went wrong:
A problem occurred configuring project ':app'.
> Cannot add task 'bundleDebugJsAndAssets' as a task with that name already exists.
* 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 4s
at makeError (/Users/user/Desktop/project/app/native/node_modules/execa/index.js:174:9)
at /Users/user/Desktop/project/app/native/node_modules/execa/index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async runOnAllDevices (/Users/user/Desktop/project/app/native/node_modules/#react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:5)
at async Command.handleAction (/Users/user/Desktop/project/app/native/node_modules/#react-native-community/cli/build/index.js:186:9)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Environment
react-native-code-push version: ^6.2.1
react-native version: 0.62.2
iOS/Android/Windows version: unknown
Does this reproduce on a debug build or release build? only checked on debug
Does this reproduce on a simulator, or only on a physical device? build error
External SDKs
I do have an external SDK in build.gradle. I don't know if that is the reason for this error.
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' } // Gradle Plugin Portal
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.6, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: "com.android.application"
apply from: "../../node_modules/react-native/react.gradle"
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
....
apply plugin: 'com.google.gms.google-services'
What I tried.
I moved two declarations to the bottom of app/build.gradle. but the error remains same
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
apply from: file("../../node_modules/#react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
apply from: "../../node_modules/react-native/react.gradle"
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
Some article state to remove the line apply from: "../../node_modules/react-native/react.gradle". But New error is
yarn run v1.22.4
$ react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 998 file(s) to forward-jetify. Using 4 workers...
info JS server already running.
info Installing the app...
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.0.1/userguide/command_line_interface.html#sec:command_line_warnings
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:mergeDebugAssets'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
> Could not resolve project :react-native-code-push.
Required by:
project :app
> Unable to find a matching configuration of project :react-native-code-push:
- 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 3s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:mergeDebugAssets'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
> Could not resolve project :react-native-code-push.
Required by:
project :app
> Unable to find a matching configuration of project :react-native-code-push:
- 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 3s
at makeError (/Users/user/Desktop/project/app/native/node_modules/execa/index.js:174:9)
at /Users/user/Desktop/project/app/native/node_modules/execa/index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async runOnAllDevices (/Users/user/Desktop/project/app/native/node_modules/#react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:5)
at async Command.handleAction (/Users/user/Desktop/project/app/native/node_modules/#react-native-community/cli/build/index.js:186:9)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I removed both line (which actually don't make any sense) the error is
yarn run v1.22.4
$ react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 998 file(s) to forward-jetify. Using 4 workers...
info JS server already running.
info Installing the app...
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.0.1/userguide/command_line_interface.html#sec:command_line_warnings
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 project :react-native-code-push.
Required by:
project :app
> Unable to find a matching configuration of project :react-native-code-push:
- 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 4s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
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 project :react-native-code-push.
Required by:
project :app
> Unable to find a matching configuration of project :react-native-code-push:
- 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 4s
at makeError (/Users/user/Desktop/project/app/native/node_modules/execa/index.js:174:9)
at /Users/user/Desktop/project/app/native/node_modules/execa/index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async runOnAllDevices (/Users/user/Desktop/project/app/native/node_modules/#react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:5)
at async Command.handleAction (/Users/user/Desktop/project/app/native/node_modules/#react-native-community/cli/build/index.js:186:9)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
There were actually two mistakes:
There is actually a line present in android/app/build.gradle which is apply from: "../../node_modules/react-native/react.gradle". You don't need to add this line instead you need to add apply from: "../../node_modules/react-native-code-push/android/codepush.gradle" below it. Adding this at end can solve problem for some user but not for all. Add it at appropriate place.
If there is an gradle error it is due to multidex. Enable multidex for all support. Add multiDexEnable true in android > defaultConfig. See this for refrence https://developer.android.com/studio/build/multidex#mdex-gradle
I faced the same issue too.
"react-native-code-push": "^6.2.1",
"react-native": "0.61.4",
Finally, I deleted that line you said and it built successfully.
I placed to the bottom of build.gradle
apply from: file("../../node_modules/#react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
//apply from: "../../node_modules/react-native/react.gradle"
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
Actually the error is because of unclear documentation . We are supposed to only add
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
beneath the
apply from: "../../node_modules/react-native/react.gradle".
But if we copy the code sample it adds the react.gradle plugin again causing the duplicate gradle task error
Had this same issue, and will outline here for anyone that has the same as me. Turns out I didn't follow the directions exactly.
It also gave me this error:
cannot find symbol
new CodePush(getResources().getString(R.string.CodePushDeploymentKey), getApplicationContext(), BuildConfig.DEBUG)
I was using multi-deployment-testing-android.md to use the staging and production keys. I was confused by the part which said to add your keys to the android/app/build.gradle file under buildTypes. Upon opening this file, only release was already there, so I only added the releaseStaging section. Turns out you have to also add debug as well even if it weren't already there. Solved it for me.
apply from: "../../node_modules/react-native/react.gradle" defined before
so simply its a duplication , try to comment or remove it and you ready to go

Could not determine the dependencies of task ':app:mergeDebugAssets'

When I run react-native run-android on my project,I get an build error of gradle. I already uninstalled react-native-ftp with npm uninstall --save react-native-ftp, removed that dependency of node_modules, clear ./gradle cached files. But the error continuous..
In my environment windows this project works normally.
What's happing?
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:mergeDebugAssets'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
> Could not resolve project :react-native-ftp.
Required by:
project :app
> Unable to find a matching configuration of project :react-native-ftp:
- 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 2s
at makeError (/home/leroto/leroto-workspace/svm/frontend/node_modules/execa/index.js:174:9)
at /home/leroto/leroto-workspace/svm/frontend/node_modules/execa/index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async runOnAllDevices (/home/leroto/leroto-workspace/svm/frontend/node_modules/#react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:5)
at async Command.handleAction (/home/leroto/leroto-workspace/svm/frontend/node_modules/react-native/node_modules/#react-native-community/cli/build/index.js:186:9)
Go to your project level android directory and run ./gradlew clean
If the problem persists, delete node_modules folder and npm install
or you can do this manually:
npm list and then resolve all UNMET DEPENDENCY issues
Step1: Check whether all your "SDK Platforms" and "SDK Tools" is installed and Updated"
Step2: Create "local.properties" file in android folder and paste the following
sdk.dir = /Users/USERNAME/Library/Android/sdk
THIS SHOULD SOLVE YOUR PROBLEMS
I got this at react-native-udp
go into
nodemodules/react-native-udp/android/build.gradle
and replace
implementation 'com.facebook.react:react-native:0.11.+'
with
implementation 'com.facebook.react:react-native:0.70.4'
changing the module name to the module where this occurred and the version number to your current react version
first
click on android folder
click on settings.gradle file
remove this
include ':react-native-ftp'
project(':react-native-ftp').projectDir = new
File(rootProject.projectDir,
'../node_modules/react-native-ftp/android')
second
click on android folder
click on app folder
click on build.gradle file and remove
implementation project(':react-native-ftp')

Error deploying Ionic app to Android Phone (Ionic 4)

I am running the command ionic cordova run android with the usb cable connected as expected. The app builds, and then when it starts to build the apk to deploy on to my phone I'm hit with this error in the terminal.
> cordova run android Android Studio project detected ANDROID_HOME=/Users/user/Library/Android/sdk JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home studio Subproject Path: CordovaLib Subproject Path: app publishNonDefault is deprecated and has no effect anymore. All variants are now published. The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_3e7pv4o3p5wholih0470cvjae.run(/Users/user/Documents/BoutiqueSolicitors/BoutiqueSolicitors/platforms/android/app/build.gradle:148) Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead. :CordovaLib:preBuild UP-TO-DATE :CordovaLib:preDebugBuild UP-TO-DATE :CordovaLib:compileDebugAidl FAILED
FAILURE: Build failed with an exception.
* What went wrong: null value in entry: incrementalFolder=null
* Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s 1 actionable task: 1 executed /Users/user/Documents/BoutiqueSolicitors/BoutiqueSolicitors/platforms/android/gradlew: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.
* What went wrong: null value in entry: incrementalFolder=null
* Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s [ERROR] An error occurred while running subprocess cordova.
cordova run android exited with exit code 1.
I looked up the error: incrementalFolder=null, and I found that people were saying to fix this error you need to delete .gradle folder inside the root directory of an existing android studio project. I have tried this with no change.
Does anyone know a fix for this? I am clueless, any help would be greatly appreciated.
Subproject Path: CordovaLib Subproject Path: app publishNonDefault is deprecated and has no effect anymore. All variants are now published.-----------> No impact.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.----------->No impact.
at build_3e7pv4o3p5wholih0470cvjae.run (/Users/user/Documents/BoutiqueSolicitors/BoutiqueSolicitors/platforms/android/app/build.gradle:148) Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead. ---------->Modify dependencies in app/build.gradle to use 'implemntation' instead of 'compile'.
:CordovaLib:preBuild UP-TO-DATE :CordovaLib:preDebugBuild UP-TO-DATE :CordovaLib:compileDebugAidl FAILED.------------>look into your aidl related changes; like definition and location of aidl interface.
run command 'gradlew assembleDebug --debug' from android studio terminal and see if it gives more details on build failure.

Categories

Resources