Error in meteor install-sdk android on windows 10 - android

I got an issue on meteor JS on my windows 10, I have installed android studio and Java 8 JDK. On my meteor project I tried to build an android by typing meteor install-sdk android, but I got an error of This command is not yet available on Windows. .. Does anyone have an idea about this?

I know this was posted a year ago, but I found a fix recently, just in case anybody gets stuck on this and needs help.
It's from this link: https://github.com/meteor/meteor/issues/4155#issuecomment-384105563
But I'll repost the solution with a few extra changes I had to make by myself.
Basically you need to install Android studio and run it to get the Android SDK, install the Java JDK, and install Cordova. After this you can add the android platform to meteor.
Steps:
Install Android Studio
Run Android Studio once for download, full installation, and accept terms
Update npm with npm i npm
Run npm install cordova -g (-g flag for global install)
Run meteor npm i -g write-file-atomic path-is-inside async-some dezalgo
Run meteor add-platform android
After doing this, you should be able to run meteor run android-device to run on your Android device using a USB cable.
NOTE:
If you are connected to a WiFi network while running meteor run android-device, you might get an error similar to this:
Error detecting IP address for mobile app to connect to:
Found multiple network interfaces with non-internal IPv4 addresses:
'some IP address', 'some IP address'
Please specify the address that the mobile app should connect
to with --mobile-server.
To fix this, modify the command to:
meteor run android-device --mobile-server <ip.of.my.device>
Of course, ensure your PC and Android device are on the same WiFi network.
Go to Settings>About Device>Status to get your current IP Address on your Android device.
The app will now be installed on your phone over the WiFi connection.
(It might take a while though)
Hope this helps.
Cheers.

Related

React native Cannot connect to react-devtools using android simulator

I execute the project with react-native run-android and in another terminal, i do:
npm run react-devtools
and it opens the new window of electron that says:
The react native app it will open in a few seconds...
but nothing happens.
I put in the simulator toggle inspector with Ctrl + m and i can see in networks that it makes a request to http://localhost:8097 and the result is it fails to connect and keeps trying with the same result.
The window of electron that is open it says that it wait connections to the port 8097 so i can see is trying to connect but with no results!
You need to run this command in a new terminal adb reverse tcp:8097 tcp:8097
react-devtools v4 is incompatible with react-native
try version 3 instead of version 4:
npm install -d -g react-devtools#3.x, it's worked for me.
The answer by #Unemployed3494 didn't work for me. Instead I killed all running processes belonging to my Mac OS user with this command:
pkill -u username
After doing so, react devtools connected as expected to the simulator.

Could not connect to development server on Android emulator Windows OS?

I am unable to solve this issue for 3 days. The same source runs fine in iOS App (Mac System ofcourse). But gets this error when I try to run in Android emulator
I have tried most of the solutions available in the internet.
1 - Dev Settings -> Adding the local ip
2 - Cleaned npm (removed node_modules and installed npm again)
3 - uninstalled npm globally and reinstalled
4 - That useless adb commands also tried
When I run, npm run start
When go to my local ip (192.168.1.61:8081) in browser, i get to know React Package manager is not running.
Turn ON the mobile data on your android emulator. This might solve the issue.

react-native run-android: usb debugging not working

I have installed the development environment for react native on Windows 7 using the instructions here.
I have installed the following packages:
Python 2.7
node 4.2.4
npm 2.14.12
react-native-cli 0.1.10
react-native 0.18.0-rc
Android SDK
I can generate a skeleton project using the command react-native init Test.
However, when I execute the command react-native run-android, the following error occurs: Unable to install path\to\app-debug.apk.
The device, a Samsung Galuxy running Android 5.0.1, is connected to my PC and USB debugging on the phone has been enabled. When I type adb devices the phone appears in the list.
I can download the apk to the phone manually using the command adb install. However, when I run the app, a red screen appears with the error "Unable to download js bundle." This error persists even after I do the following:
Start the local development server using react-native start
Executing the command: adb reverse tcp:8081 tcp:8081
On the phone, setting the debug server host and port to localhost:8081
Update: I have solved one problem by downloading gradle to version 1.2.3 as described here. However, the red screen still appears with the error Unable to download js bundle.
What could be the problem?
You are working fine. for this problem have added the IP address in device Setting server host. one more thing your machine and device should have on same network.

How to run command 'ionic run android' on specific device?

I have 2 devices detected in adb. One from my genymotion, and the other from my real device :
$ adb devices
List of devices attached
192.168.57.101:5555 device
e78ab88d device
I want to run my ionic app on e78ab88d device. How can i achieve this?
If i run ionic run android, its automatically run on my genymotion device. It says, no target specified.
img no target specified
What command to run on specific device?
run with target device id, something like :
ionic run android --target=e78ab88d
EDIT
With new Ionic 3 CLI use :
ionic cordova run android --target=e78ab88d
For list of all available devices, use :
ionic cordova run android --list
try this command may help you
ionic run android --e78ab88d
Using --target=e78ab88d failed for me. But it seemed to work when I used --device=e78ab88d.
Basically I have 2 Android phones connected and I wanted to target a specific device. without the --target or --device, it deployed randomly to the devices.
ionic cordova run android --device=e78ab88d worked for me. Just in case someone is experiencing the same problem as me.
to also run the app live do.
$ionic cordova run android -l
make sure that the phone is connected with laptop through cable.

debug android app with ionic- cordova

There is a way to debug?
I use
ionic run android
command to run the app on android but then - how can I see console.log() messages?
Thanks
If you run your app in the livereload mode you will see the console.log() messages. You can start it like this:
ionic run android -l
You can also use chrome developer tools like it would be a normal webpage. Here is good description how you achieve that: Remote Debugging on Android with Chrome
Connect with an android device which has Android OS version >= 5
Enable developer option from the settings. This procedure varies from device to device. In addition you must enable USB debugging mode from developer option or from other section of your device.
If you get any error like “Your device is not connected” from Android SDK or Android studio then find out the problem from your device manager of pc. Most of the time appropriate driver or driver is not installed in the machine. Download it and follow my instruction in a video (Yafi Tech).
Run the command ionic cordova run android. APK is built and installed in the device. done
run “chrome://inspect” in the chrome status bar. Remote debugging of connected device has been started.
Now run the installed application and operate from the device or chrome.
Click on inspect of WebView. For debugging Go to the console of browser if you want to trace out any error.
you can also watch video here
Now that there is a livereload option (-l), to see the console.log messages you have to use -c or --consolelogs
But to have logs, the livereload option is required so :
ionic run android -lc
See the documentation for more options :
http://ionicframework.com/docs/v1/cli/run.html
The Ionic CLI has been updated for ionic 2+ to deploy app in live reload mode use the following command.
Synopsis
$ ionic cordova run <platform> <options>
Example
$ ionic cordova run android -l -c
Make sure that you have installed the latest version of Ionic/Cordova CLI
with Ionic 5 and cordova 9 use:
ionic cordova run android -l --consolelogs
where -l is for livereload
If you want a real debug, with watches, step into, etc, try the Cordova Tools extension for Visual Studio Code
The page constains the instructions for debuging on device.
Connect your android device to computer/laptop and simply run below command
ionic cordova run android --device -l --debug
From ionic doc
ionic run ios [options]
http://ionicframework.com/docs/cli/run.html

Categories

Resources