Getting error to run ionic app on android device - android

This is my first ionic app.When I am try to run app on android then I am getting error.I searched many answer but nothing worked for me.
Error: Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=/Users/arpansarkar/Library/Android/Sdk (recommended setting)
ANDROID_HOME=/Users/arpansarkar/Library/Android/Sdk (DEPRECATED)
Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle
in your path, or install Android Studio
[ERROR] An error occurred while running subprocess cordova.
I am export all require thing in my .bash_profile and I have android studio installed.
Please help me...Thanks..
export JAVA_HOME=$(/usr/libexec/java_home)
export ANDROID_SDK_ROOT=$HOME/Library/Android/Sdk
export PATH=$PATH:$ANDROID_SDK_ROOT/tools/bin
export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools
export PATH=$PATH:$ANDROID_SDK_ROOT/emulator
export GRADLE_HOME=/Users/arpansarkar/Development/gradle-5.5.1/bin
this is my .bash_profile.

Can you please provide what is the result of "ionic info" command?
This is my path settings by which I'm able to create an android build.
export GRADLE_HOME=/opt/gradle/gradle-5.4.1
export PATH=$PATH:$GRADLE_HOME/bin
export ANDROID_HOME=/home/prachishah/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-tools

Related

Problem with Android Environment setup in React Native

I am running React Native app on MacBook M1 chip, I have already set up the environment like this, but when I type NPM RUN ANDROID, the error kept showing, please help me out, Thanks
Please check path
export ANDROID_HOME="/Users/yourUsername/Library/Android/sdk"
export PATH=$ANDROID_HOME/emulator:$PATH
export PATH=$ANDROID_HOME/tools:$PATH
export PATH=$ANDROID_HOME/tools/bin:$PATH
export PATH=$ANDROID_HOME/platform-tools:$PATH
please check here

Setting Android Development command line tools: Error: Could not determine SDK root

so I am trying to setup android development environment for working with React Native.
Now I have done then following:
Downloaded the command line tools zip file from Android Studio.
Extracted the zip file into /opt/android
opened my nano .bash_profile added the following below
export ANDROID_HOME=/opt/android export
PATH=$PATH:$ANDROID_HOME/emulator export
PATH=$PATH:$ANDROID_HOME/tools export
PATH=$PATH:$ANDROID_HOME/tools/bin export
PATH=$PATH:$ANDROID_HOME/platform-tools
Edit
I just now saw this thread: Having similar problem but when I tried to change the $ANDROID_HOME to $ANDROID_SDK_ROOT as suggested from that thread I still get the same error as before so I do not know where I am missing it
Loaded the config to shell source .bash_profile
So I tried to run the following sudo /opt/android/cmdline-tools/bin/sdkmanager --list I get the following error below:
Error: Could not determine SDK root.
Error: Either specify it explicitly with --sdk_root= or move this package into its expected location: <sdk>/cmdline-tools/latest
So from there I get stuck because I would not know what Android studio packages am I to install can I please get some assistance really stuck

Task 'installDebug' not found in project ':app' while installing react native app in android emulator/device on macOS Catalina

I was trying to install a react native app in Android emulator/device on macOS Catalina using following command
npx react-native run-android
but unable to install it on emulator due to below error
Task 'installDebug' not found in project ':app'.
I already added,android sdk path in .zshrc file, those are as follows
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-tools
but didn't get any success.I know i am missing something major here,
but how to install react native app in android emulator/device on MacOS Catalina.
Thanks in Advance.

Phonegap android build error on macosx

I'm trying to build an apk from my phonegap project. When I run phonegap build android I get Error: EPERM, operation not permitted error so I tried sudo phonegap build android but I get this error:
[Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions.]
When I run sudo android I get the android manager so I have correctly exported android path. What is the problem then?
This is part of my .profile file:
export ANDROID_HOME=/Users/Iman/Documents/SDKs/android-sdk-macosx
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
For OSX:
export ANDROID_HOME=/<installation location>/android-sdk-macosx
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Reference the Installation guide here: http://spring.io/guides/gs/android/

getting error ANDROID_HOME is not set and "android" command not in your PATH. by trying to build

I get this error with the commane emulate or build despite the .profile's update :
export ANDROID_HOME="/usr/local/android-sdk-linux/tools"
export ANDROID_PLATFORM_TOOLS="/usr/local/android-sdk-linux/platform-tools"
export PATH="$PATH:$ANDROID_HOME:$ANDROID_PLATFORM_TOOLS"
My emulator is correctly launched (nexus 7) and I installed all the necessary Android packages via the android command.
its suppose to be like this
export PATH=${PATH}:/usr/local/android-sdk-linux/platform-tools
export PATH=${PATH}:/usr/local/android-sdk-linux/tools

Categories

Resources