I have a problem...After the build of my project PhoneGap, I want to run the it on my device with this command:
cordova run android
When I run this command I receive this error:
WARNING : No target specified, deploying to emulator
So run the emulator...I woun't the emulator, it's very slow...I Enable USB debugging on my device...Where is the problem? Also I want use the library of AngularJs...Where must I put the library? Thanks!
Related
i want to preview my nativescript code on an android emulator which as i use the command line which is, i navigated to my app folder which which was successfully but when i type "tns preview" to run an android emulator to see my code in action i get
Found peer TypeScript 3.1.6
#
# Fatal
process OOM in insufficient memory to create an Isolate
#
TypeScript compiler failed with exit code 3221225477
and an android emulator is connected successfully, even nativescript notice the emulator, please what do i do
i have tried the Nativescript sidekick to start the emulator but the nativescript sees the android emulator and it did not report an error indication but when i select the android emulator and click "Run on Device" i get
Build failed. TypeScript compiler failed with exit code 3221225477
even i have tried using my android device for previewing it which i install the nativescript playground & nativescript preview but if i scan the QR Code it is not previewing, please help out
please i need a solution
Preview is to be used with real device for quick testing. The basic idea is to avoid setting up whole iOS / Android SDKs on your local machine.
Produces a QR code which can be used to preview the app on a device without the need to install various SDKs and tools or configure your environment for local iOS or Android development.
To scan the QR code and deploy your app on a device, you need to have
the NativeScript Playground app:
App Store (iOS):
https://itunes.apple.com/us/app/nativescript-playground/id1263543946?mt=8&ls=1
Google Play (Android):
https://play.google.com/store/apps/details?id=org.nativescript.play
If you want to view your app on your android emulator, run the command
'tns run android --emulator'
This is assuming you already have an emulator set up on your machine.
To see a list of your available devices run the command
'tns device'
If you have not set up an emulator follow setup here: https://docs.nativescript.org/tooling/android-virtual-devices
When building a react-native project for android you run the following command
react-native run-android --variant=release
However for a successful release build an android emulator needs to be running. If it's not you'll get the following error:
* What went wrong:
Execution failed for task ':app:installRelease'.
> com.android.builder.testing.api.DeviceException: No connected devices!
But I don't want to start an emulator because I'm building the project in a container that doesn't support android emulators.
Is it possible to build a react native application for Android without running an emulator?
Note:
A physical device won't work because I'm working with containers that are running in CircleCI which is a Cloud-based Continuous Integration service.
The react-native command line utility wraps another utility called gradlew (which is in fact another wrapper for gradle that will download gradle if it doesn't already exist).
The gradlew utility lives inside the android directory and can be used directly like this:
cd android
./gradlew assembleRelease
So if you're wanting to build a release Android Package (APK) but not run it on an emulator then the above command will work!
You could test your app in browser. But which need some third-party tools, such as https://snack.expo.io/, and here is a good tutorial about using it.
Why not just use a physical device?
As long as you have followed these steps:
1. Open the Settings app.
2. (Only on Android 8.0 or higher) Select System.
3. Scroll to the bottom and select About phone.
4. Scroll to the bottom and tap Build number 7 times.
5. Return to the previous screen to find Developer options near the bottom.
you can enable USB debugging on your device under developer options. After enabling USB debugging, react-native will target your device and install the release apk.
Hello I'm trying to build a mobile app out of cordova but I have 0 knowledge on it so I read and tried documentation of cordova but it seems like I'm stuck on the emulation part after I input cordova build on terminal it compiles the project and notifies me that the build was a success.. But after I ran cordova emulate android it compiles for a few sec then gives an error message the error message is
anyone know whats the problem here?? Basically everything I've done was from the documentation of the cordova site. also my android emulator is running before I run the command cordova emulate android
Have you tried specifying the emulator to run the app with?
cordova run android --target=youremulatorname
or
cordova emulate android --target=youremulatorname
Also, check whether your emulator uses the API level between the indicated android:minSdkVersion and android:targetSdkVersion in the generated AndroidManifest.xml file.
The AndroidManifest.xml file can be found in
YourAppFolder/platforms/android/AndroidManifest.xml
You can check which API level your emulator uses through
SDK Manager > Tools > Manage AVDs
I have a Cordova project, that I can run on my Android phone using ionic run android --device and on my iPad using ionic run ios --device. However, now I connect my iPhone 5, and run the last command again, but get the following error message.
...
[ 60%] TakingInstallLock
[ 65%] PreflightingApplication
[ 65%] InstallingEmbeddedProfile
[ 70%] VerifyingApplication
2015-06-24 17:58:48.564 ios-deploy[33436:1048931] [ !! ] Error 0xe8008015: ∑~}ˇ AMDeviceSecureInstallApplication(0, device, url, options, install_callback, 0)
Error code 253 for command: ios-deploy with args: -d,-b,/path/to/project/App/platforms/ios/build/device/project_name.app
ERROR running one or more of the platforms: Error: /path/to/project/platforms/ios/cordova/run: Command failed with exit code 2
You may not have the required environment or OS to run this project
Online (also on SO) I find many users facing this issue with an Android device, and then they need to install the Android APK. I also read here that I have to run the following command first: sudo npm install -g ios-deploy, which I did. It did not help though.
I am using version 5.0.0, and I read here that I have to downgrade to version 4.3.0. I find this hard to believe though. Is there another cause for this error? How can I check for it, and how can I solve it?
I encountered the same ios deploy AMDeviceSecureInstallApplication error when deploying to a new ios device. Here is how I was able to resolve it and successfully deploy to the new ios device. Start xcode and open your xcodeproj file which can be found in your project_name/platforms/ios directory. Once the project is finished loading then from the top menu select Product and then select destination and choose your new ios device. Then when you click run in xcode you will be prompted that it cannot run on the new ios device because of your code signing provisioning profile. There will be an option that says something like "try and fix it" and simply select that option and follow the prompts, confirm which provisioning profile you want to use to deploy your app to the device. If you only have one provisioning profile then select that one and the app will now run on your device. And in the future you should be able to deploy to this device using the ionic run ios --device command.
I am trying to use the Android emulator to install an app on it.
Unfortunately the emulator is never starting up. I use the following
command in my cordova project:
cordova emulate android
The last output I get from console is:
Waiting for emulator...
But the emulator does never start (I waited 45 minutes now).
The path variables are all correctly set and I can start the
emulator using Eclipse or Android studio but not using the
command from cordova.
Any hints?
If you can start the emulator through android studio, then as a work around start the emulator outside and run the command
cordova run android
It will deploy your app in the already running emulator.
Check emulator path settings
https://cordova.apache.org/docs/en/4.0.0/guide_platforms_android_index.md.html
If not able to execute then do :
use the alternate shell interface:
$ /path/to/project/cordova/run --emulator
Instead of relying on whichever emulator is currently enabled within the SDK, you can refer to each by the names you supply:
$ /path/to/project/cordova/run --target=NAME
Check the documentation above and see whether your PC supports virtualization or not.
I was getting the same issue, I resolved it by:
Open Android device manager, click on window -> Android Virtual Device Manager
There you will see listing of all the Android Virtual Devices, if you see any device with repairable icon on it, just click on repair and then try. It works.
I had the same problem. Though cordova started the emulator, the command line kept on saying 'Waiting for emulator...' forever.
The trick is, before running the command:
cordova run android
make sure you navigate into the android platform folder. That is, don't run the command from within the
/project folder
but instead from within
/project/platforms/android folder
That will launch your application in the Android emulator