I installed latest version of phonegap with npm, which shows version 4, and latest android sdk.
After creating simple myApp "hello world" project to test, I added android platform and can do local build and run the app with phonegap developer app on my phone.
But... if I do a remote phonegap build then the error log from build.phonegap.com for this app shows
'Error: The command "android" failed. Make sure you have the latest Android SDK installed, and the "android" command (inside the tools/ folder) is added to your path.'
I have JAVA_HOME and ANT_HOME configured and ant and the android sdk tools and platform-tools are in my path.
I can execute android from cmd shell to bring up SDK Manager.
This is all on Windows 7 64 bit.
I'm probably missing something simple, but driving me nuts that I can't do a remote build.
It appears that there was a temporary problem with the phonegap build service, which is now working again.
Ah well...
Related
Has anyone encountered this error in Windows? using Quasar Cordova Android.
upon checking for the requirements using "cordova requirements"
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-32,android-30
Gradle: installed C:\Gradle\gradle\bin\gradle.BAT
It's completed. However whenever I run "quasar dev -m android". It is giving me the error (see screenshot from the cmd of vs code.) I can't find any solution of this on the internet. I'm using Quasar framework of Vue js.
and upon running a specific android using "quasar dev -m cordova -T android --e ["nameOfTheAVDMAnagerYouCreated"]"
I get this error in the cmd of cordova.
How can I fix this?
Weird error I got as well
Try simply restarting your computer. Worked for me
Installing command-line tools from Android Studio solves this problem.
Start Android Studio
Click Tools->SDK Manager -> SDK Tools -> Check Android SDK Command-line Tools (latest)
Press Ok to download it.
I've been at this for a whole day.
I created a new project using npx react-native init Project. But If I try to run it on android I get this:
FAILURE: Build failed with an exception.
* What went wrong:
Incompatible magic value 0 in class file java/util/logging/ErrorManager
I've went through the docs many times. When I run npx react-native doctor, I get this:
Android
✓ JDK
✖ Android Studio - Required for building and installing your app on Android
✖ Android SDK - Required for building and installing your app on Android
- Versions found: N/A
- Version supported: 29.0.3
✓ ANDROID_HOME
So there were a few things that were causing this issue.
✖ Android Studio - Required for building and installing your app on Android
It seems that npx react-native doctor looks for /opt/android-studio, after placing my android studio in /opt/, it was able to detect it.
✖ Android SDK - Required for building and installing your app on
Android
Versions found: N/A
Version supported: 29.0.3
From what I understood, react native uses sdkmanager script to look for sdk which comes with command line tools when you install android studio. In my case, when I ran the script it was giving me errors. The reason for that was that I hadn't created JAVA_HOME environment variable. So, after creating the environment variable and adding it to PATH, the sdkmanager script ran successfully and so did the react native project.
TL;DR
You need to have your android studio folder in opt and it must be named android-studio.
Install android sdk command line tools(latest) and add it to your PATH like this export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin
Also create JAVA_HOME and add it to PATH.
It's look you don't have installed Android Studio in your system.
Try to install from official site https://developer.android.com/studio#downloads
Or use snap https://snapcraft.io/install/android-studio/manjaro
sudo snap install android-studio --classic
I am trying to add android as a cordova platform so that I can build apps with phonegap. When I tried to add android thus:
cordova platform add android
I received this error message:
Error: The command "android" failed. Make sure you have the latest Android SDK installed, and the "android" command (inside the tools/ folder) is added to your path.
I do have the latest Android SDK installed and just modified the bash profile by adding this:
export PATH=${PATH}:/Development/adt-bundle/sdk/platform-tools:/Development/adt-bundle/sdk/tools
For some reason when I run "cordova platform add android" I am still getting this error?
Your SDK is not being detected or you have an outdated version.
Ensure you have updated your SDK.
Open another Terminal.
I just went to Phonegap and saw that I needed to install node.js to get started.
I did this, then followed the command line to install phonegap.
However, where is it? I don't see anything in my program files folder, I don't see Eclipse, and there's no documentation on what to do next on Phonegap's website. I don't understand why this instruction is so vague? What am I missing? And where did all those files I downloaded/installed go go?
Thanks
Phonegap 3.3 installation there is no proper info in phonegap site.
The reason of installing nodejs is, phonegap cordova are created as node modules.
Required Software’s:
Follow the steps. 1 Node Js 2 ANT 3 Android_sdk 4 JDK
open command prompt:
Follow the steps
C:\user\youruser>npm install -g phonegap
C:\user\youruser>npm install -g cordova
Set Environment variables:
Mycomputer -> Right Click -> properties -> Advance System settings -> Environment
variables
set path for 1. Java JDK 2. Android SDK 3. ANT
C:\user\youruser>cordova platform add android
C:\user\youruser>phonegap create First-app
C:\user\youruser>cd First-app
C:\user\youruser>phonegap run android
Phonegap will be installed and apk will be created in bin folder.
You will be getting
[phonegap] detecting Android SDK environment..
[phonegap] using the local environment
[phonegap] compiling Android...
[phonegap] successfully compiled Android app
[phonegap] trying to install app onto device
[phonegap] successfully installed onto device
You can able to see phonegap modules in C:\Users\yourusername\AppData\Roaming\npm.
Hope this will be very helpful. Let me know if you face any issues.
Phonegap installation steps present on the official site are somewhat vaguely presented and hasn't been properly updated.
With respect to your question, I think this post https://stackoverflow.com/a/18751002/4277415 might help you out.
Cheers.
Install phonegap without any error : http://www.markupjavascript.com/2014/07/installing-phonegap-in-windows.html
I installed nodejs and did the following:
npm install -g phonegap
phonegap create <app path>
cd <app path>
phonegap run android
when i execute the run android command, I get below error:
An error occurred during creation of android-sub project. The system cannot find the project specified.
not sure where this is coming from.
any clues.
Thanks
Had the same problems and a hard time finding a solution, however:
Make sure JAVA is installed
Set JAVA_HOME & PATH variables
Make sure ANT is installed
Set ANT_HOME & PATH variables
Make sure Android SDK is installed
Add PATH to sdk/tools
Add PATH to sdk/platform-tool
Run SDK manager to update & install SDK elements
Run AVD manager to create a default emulator image
Install NodeJS (with PATH)
Follow the usual tutorials
npm install -g cordova
cordova create hello com.sample.hello HelloWorld
cd hello
cordova platform add android
cordova build
now launch your Emulator
cordova emulate android (patience, take ages...)
or
cordova run android
much faster, just make sure you mobile device is connected, on, unlocked, usb debug is on, and drivers are installed
if you can't find one try: sdk\extras\google\usb_driver
npm install -g phonegap
phonegap create hello com.sample.hello HelloWorld
cd hello
phonegap platform add android (if not working use cordova command)
phonegap build android
now your launch Emulator
phonegap emulate android (patience, take ages...)
or
phonegap run android
much faster, just make sure you mobile device is connected, on, unlocked, usb debug is on, and drivers are installed
if you can't find one try: sdk\extras\google\usb_driver
I think the main difference between phonegap/cordova, is phonegap (which belong to Adobe) has the possibility to build in the cloud via https://build.phonegap.com/
Whitespace is not allowed i would say