Cordova not launching android app to emulator - android

Hi everyone,
I am running an example cordova app on platform android with command:
cordova run android
The command line gets stuck on
"........................." and keeps continuing.
When I run with:
cordova run android --verbose
I get the following:
Running adb shell command "ps" on target emulator-5554... Running
command: D:\android-sdk\android-sdk\sdk\platform-tools\adb.exe -s
emulator-5554 shell ps Command finished with error code 0:
D:\android-sdk\android-sdk\sdk\platform-tools\adb.exe
-s,emulator-5554,shell,ps
As you can see my emulator is already up and running. What can I do to solve this issue, I have tried answers from other slackoverflow similar questions, but it's not working.
Thanks

Related

Error when installing .apk on Linux beta in Chrome OS

I'm trying to install an apk file in the Linux terminal on my Chromebook, so I followed instructions from this website. So I installed the ADB and ran adb connect 100.115.92.2:5555, and after that I tried installing my apk by running adb install opinionrewards.apk but it returned this error:
error: more than one device/emulator
adb: error: failed to get feature set: more than one device/emulator
- waiting for device -
error: more than one device/emulator
Can someone please explain why this error occurred and how to fix it?
Okay, all I had to do was adb kill-server and then start it again, and just install it again.
Use this command:
adb -s emulator-5554 install filename.apk

Starting: Intent { cmp=com.MainActivity } and response error code 500 React Native

Hi, I'm a beginner with React Native, while running react-native run-android, this error was returned.
BUILD SUCCESSFUL
Total time: 15.473 secs
This build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html
Running /home/gustavo/Android/Sdk/platform-tools/adb -s XXXXXX reverse tcp:8081 tcp:8081
Starting the app on XXXXXXX (/home/gustavo/Android/Sdk/platform-tools/adb -s XXXXXXX shell am start -n com.aa/com.aa.MainActivity)...
Starting: Intent { cmp=com.aa/.MainActivity }
**but nothing works**
before it worked.
I already uninstalled the app from my phone.
I've run the command "adb -s XXXXX reverse tcp: 8081 tcp: 8081"
I already deleted the folder node_modules and executed the command "sudo npm install"
I believe it is on the cell phone as it started to happen this after having done some biuld over wifi.
Does anyone know what can it be?
enter image description here
enter image description here
You need to start the development server with npm start in your project.
Make sure that the app is already installed on your phone, so it can communicate with the dev server.
Check the output of the terminal window running the development bundler. It’s likely you just have a syntax error in your code.

ubuntu phonegap run android error 1

I'm trying to run the Hello-World app of Phonegap on Ubuntu 16.
"/my-app# phonegap --verbose run android"
But no matter what it always takes very long and finishes with an error:
"Running adb shell command "getprop dev.bootcomplete" on target emulator-5584..."
"Running command: adb -s emulator-5584 shell getprop dev.bootcomplete"
"Command finished with error code 1: adb -s,emulator-5584,shell,getprop,dev.bootcomplete"
I've creating different avds and running everything as root user but no change.
Any suggestion what this "error code 1" means would be highly appreciated - I could only find other error codes with the search.
Try running adb kill-server and restart doing all the process again.
EDIT:
Try starting emulator with ubuntu cmd:
LD_PRELOAD='/usr/lib/x8stdc++.so.6' ~/Android/Sdk/tools/emulator -netdelay none -netspeed full -avd Nexus_5X_API_21
where Nexus_5X_API_21 is your emulator name
~/Android/Sdk/tools/emulator is your path where emulator is stored
Do this after adb kill-server, then on another cmd tab, try running
phonegap emulate android --verbose

Test app in android phone using command line?

Android Studio is running quite slow in my laptop so Im planning use Android Studio just for building the app structure and use Sublime Text 3 for coding, but I want to test my app in my phone connected via USB using a command within the terminal. ADB maybe? or something else?
you can push the apk and install using adb install.
Of course, you still need to compile the new APK each time.
To run your tests from the command line use am instrument. For example to run all tests in your package:
$ adb shell am instrument -w com.example.foo/android.test.InstrumentationTestRunner
assuming your application package name is com.example.foo and is using InstrumentationTestRunner.
To verify your test package is installed, run
$ adb shell pm list instrumentation
EDIT
Or, if you just want to run the app once installed
$ adb shell am start -n com.example.foo/.MainActivity

How to run a shell script in android app?

I have one shell script placed in /sdcard/test.sh
And the test.sh file has the below command.
screenrecord --time-limit 10 /sdcard/sreee.mp4
When I run this command from adb shell command from Windows machine command executed successfully without any errors.
My Question is how can I execute the same script from Android app where When I press the start button?
Could you please help me out on this with a best example?

Categories

Resources