How to fix Cordova Android emulator problem? - javascript

I use Cordova and VueJs in my project.
I installed Android studio and Android emulator
if I run the command
cordova emulate android
I see only
No emulator specified, defaulting to Nexus_6_API_28
Waiting for emulator to start...
After 30 min+ wait, android emulator still does not run.
How to fix this problem?

did you download android API 28(google api) and x86 Images for API 28.
Please first download if not download both

Related

Cordova Unable to load platformapi

I have been having this issue for few days now. Cordova won't run in browser, error says browser is not added as a platform. However, trying to add browser as a platform, cause another error which says Unable to load platfromapi from platform. It also says that browser is not a valid platform. See screenshots:
Cordova issue 1
Cordova issues 1
Cordova issue 2
Cordova issues 2
Remove the platform which you try to run on it (browser, ios, android, and etc.)
cordova platform rm browser
Add the platform again
cordova platform add browser
You can run
cordova run browser
It looks like the plugin PlatformApi (or what its name is exactly) is not supported by the browser platform.
You can not use the "cordova platform add browser" because the plugin was not written to work with the browser
Maybe it has some specific features that can not be emulated in the browser.
For those who's still experiencing this issue in latest ionic and cordova versions. Run:
ionic cordova platform rm browser/android/ios
ionic cordova run --emulator
Goto Your android studio -> tools -> android -> Sdk manager -> Sdk platform and update Android 7+ and 8+
And then run
cordova platform rm browser
cordova platform add browser
i saw this error when i tried to install the android platform that was too high for my current cordova cli, upgrading the cli solved it

Adding Cordova Platforms

Hey, Guys! I recently started to work with Cordova and when I run the Cordova platform add android i get the following error. I have successfully placed the environment variables for Java and for the Android SDK as well. But the npm modules does not exist in C:/Windows/System32/npm as shown in the error, It is in the Users/My username/AppData/Roaming/npm folder. Some guidance would be appreciated.
I followed the following scripts which are shown in the official Cordova documentation to create a new project.
Cordova create hello com.example.hello HelloWorld
cd hello
Cordova platform add android -> where I'm stuck at
Kindly Check the Android Version Provided by Cordova and verify with your current Android version installed on your system , if there a mismatch :
1) Update Android Version From Android Studio SDK Manager
2) Update Cordova Platform - Refer: Cordova Documentation
External Source
cordova - Error: Failed to fetch platform android
I figured out halfway what the the problem was. There was a file named 'npm' in my C:/Windows/System32 directory wich was of 0kb size, and once i deleted it, the error vanished. But not all the way though. I was able to install the browser platform but not the android platform via cordova platform add android or even specifying what the matching cordova-andriod pluggin to be with cordova platform add andriod#version.
Only through the cordova platform add https://github.com/apache/cordova-android.git script I could install the andriod platform and once it was done other steps worked fine, and the project ran through the Android AVD. Any idea why the normal command to add the android platform didnt work, Just want to know but if it happens again i think Im gonna have to run the get from git command again. Thanks

How to fix the issue in running my NativeScript app in android?

I typed : tns run android in the terminal and the default emulator API23 popsout but it did not install my app instead I got an error as stated below.Unlike when i run it in IOS simulator which runs without any error.
Cannot run your app in the native emulator. Increase the timeout of
the operation with the --timeout option or try to restart your adb
server with 'adb kill-server' command. Alternatively, run the Android
Virtual Device manager and increase the allocated RAM for the virtual
device.
Any help would be appreciated? Thanks!
Yes! I just solved my issue by downloading emulator in my Android
Virtual Device Manager. And I run my Nativescript application in
android. It worked. If you have the same problem I stated above,
please check in your Android Virtual Device Manager if you haven't
downloaded emulator first. Make sure you download the latest emulator.

Cordova console.log not working

Hello I downloaded and installed node.js as I have done million times also I installed cordova as mentioned in their docs. Furthermore I installed console.plugin with "cordova plugin add org.apache.cordova.console". Finally I did cordova build android and the cordova emulate android, and inside www/js/index.js onDeviceReady I simply entered this console.log('test');
I'm new with cordova and I cant figure out why I dont see and output in my terminal.
PS: I'm on ubuntu 12.04 LTS 64bit, and I dont use eclipse. Shouldn't I see the console.log output in my terminal window ?
From the CLI run your Android project and display console output from chromium (if using Crosswalk) or SystemWebViewClient. View Debugging priority and above logs from these places, and silence everything else.
cordova run android && adb logcat chromium:D SystemWebViewClient:D *:S
Using alert() is a rather dilettantish debug methodology. The most simple is to use a hardware device or an emulator with adb and chrome://inspect. This provides the debug bridge for the Cordova WebView, as well as the JS console, JS debugger, DOM inspector, etc. within Chrome.
See Get Started with Remote Debugging Android Devices.
The output will appear in an output window, not in the terminal window.
I run my Android Cordova apps in Eclipse and logs appear in the Logcat output window, similarly with iOS apps and Xcode, they appear in the Xcode output window.
You could always just alert() or navigator.notification.alert() to quickly see your logged values.
Hope this helps.

Sencha Touch 2 App with Cordova 3.1 run slowly iOS 7

I have build an application with Sencha Touch 2.
I compiled it with xCode 5, using Cordova 3.1. It run well in my iPad with iOS 6.0, but when I actualized to iOS 7.0 the App doesn't work well, it runs very very slowly. How can I resolved this problem?
Thank you in advance!!
Please run the system log to see errors if there are.
Command to see the logs
tail -f /var/log/system.log
run this command from terminal and let me know the errors

Categories

Resources