How to install my NativeScript application in my phone? - javascript

I have build an android application using NativeScript but now i want to install it in my android phone but i don't know which .apk file i have to take to install the application in my phone.

According to the {N} docs you should execute tns deploy android on the command line. This will install your app onto the currently connected device. After the app has been installed, it will automatically start on Android.
If you want your app to be compiled before installing it on your device, you should execute tns run android on the command line. This will prepare, build and deploy your app.
You can find all the cli commands on the github page: https://github.com/NativeScript/nativescript-cli

Related

An error occurred while running subprocess cordova. Why?

I make mobile game on JS, and i use Ionic for build Android app.
For adding to my project Android Platform i writed:
C:\TB>ionic cordova prepare android
But this back me:
? Platform android is not installed! Would you like to install it? Yes
> cordova.cmd platform add android --save
You have been opted out of telemetry. To change this, run: cordova telemetry on.
Using cordova-fetch for cordova-android#9.1.0
Adding android project...
Could not load API for android project C:\TB\node_modules\cordova-android
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd platform add android --save exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
At my node_modules folder have subfolder cordova-android, why ionic?!
How can i fix this?
P.S. My android SDK at needed folder AppData\Local\Android\Sdk
Try running the following commands
ionic cordova platform rm android
ionic cordova platform add android
ionic cordova build android

How do I open react-native app in emulator?

I have a react-native app that I have just ejected from expo to a bare react-native app.
I can run yarn react-native run-android without any errors and even opens my android emulator however, I can't see my app available within the emulator.
Should this open automatically or should I see it available in the app draw?
How can I start my app within the emulator?
note: the Who Am I app is not it. It's my built version via expo before I ejected.
The command should be react-native run-android not yarn react-native run-android unless you defined the script react-native run-android as itself in your package.json.
Then the app should start by itself in the emulator, but you have to run react-native start to use it.
react-native run-android installs the app on the emulator so you should be able to find the launch icon of your app inside the emulator
Using react-native run-android without exactly one device (one emulator or one real device) leads to an error (Failed to install the app. Make sure you have an Android emulator running or a device connected. in case none is connected) thus if you don't have a real device connected your emulator is detected.

Ionic run android not working

After pulling from the git repo after some time and few changes done by my colleagues, running app on my android device stopped working. I was able to run my app on my device before with usb debugging enabled, but now I get the following error after running the command ionic run android:
No target specified, deploying to emulator Error: No emulator images
(avds) found.
1. Download desired System Image by running: /Users/myUser/Library/Android/sdk/tools/android sdk
2. Create an AVD by running: /Users/myUser/Library/Android/sdk/tools/android avd HINT: For a
faster emulator, use an Intel System Image and install the HAXM device
driver
Go to the Android Studio open the AVD Manager then create AVD(if not yet created) and launch it in the emulator. Now execute the command ionic run android it will run correctly.
Possible duplicate of adb not finding my device / phone (MacOS X)
I had the same problem and can resolve this by restart my device and my Mac.

cp: /javascripts/phonegap.js: No such file or directory

PhoneGap is not installed in my mac. Now, I want to run a PhoneGap project with Xcode and I am getting this error. Can anyone tell me how to run the PhoneGap project in Xcode? I want to run the project from Junkyard-Jumbotron.
I can't comment yet, have you checked in the file directory to see if the file exists? Make sure you have met all of the requirements.
install the following:
- Xcode 4.3+
- Xcode Command Line Tools
- Intel-based computer with Mac OS X Lion or greater (10.7+)
- Necessary for installing on device:
-----Apple iOS device (iPhone, iPad, iPod Touch)
-----iOS developer certificate
Install the iOS SDK and Apache Cordova
- Install Xcode from the Mac App Store or Apple Developer Downloads
- Install the Xcode Command Line Tools (Xcode Preferences -> Downloads -> Components -> Command Line Tools -> Install).
- Download the latest release of [Apache PhoneGap
-----extract its contents
-----Apache Cordova iOS is found under lib/ios
Install CordovaLib
-Download the Cordova source
-Extract to source to their final permanent location on your hard drive (for example, to ~/Documents/CordovaLib-2.X.X)
- There is no step 3
Here is the link to getting started on a new project:
http://docs.phonegap.com/en/2.1.0/guide_getting-started_ios_index.md.html#Getting%20Started%20with%20iOS

Ionic- Cordova Build Issue

When I try to run ionic I get the below error, Am I just missing cordova? or is it something else?
Usr:example1 user$ ionic add platform ios
Bower component installed - platform
Usr:example1 user$ ionic build ios
The provided path "/Users/user/ionicApps/example1/platforms/ios" is not a Cordova iOS project.
Usr:example1 user$
Cordova is actually installed, when I did cordova -v I see 5.0.0
The command to add the iOS platform is:
ionic platform add ios
Make sure you're on a Mac because you can't do this on Windows or Linux.

Categories