ionic build android command not working - windows

am new to ionic, I have followed the steps to setup the environment for developing ionic apps from ionicframework site but am stuck on using the ionic build android command coz I get this error
[Error: Please install Android target: "android-17". Hint: Open the SDK manager by running: C:\Program\ Files\Android\android-sdk\tools\android.BAT
You will require:
1. "SDK Platform" for android-17
2. "Android SDK Platform-tools (latest)
3. "Android SDK Build-tools" (latest)]
ERROR building one of the platforms: Error: cmd: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 2
and all these build-tools and platform-tools are installed.what might be the problem please.The android command on win cmd is working well coz its openning the sdk manager
Error image

Related

NatvieScript Installation Error(windows)

I have a problem completing NativeScript installation requirement. I got stuck at number 5 in the installation guide available here.
When i run the command "tns doctor" in the command prompt, i get the error message below:
Cannot find a compatible Android SDK for compilation. To be able to
build for An droid, install Android SDK 22 or later. Run $
%ANDROID_HOME%\tools\android to manage your Android SDK versions.
You need to have the Android SDK Build-tools installed on your system.
You can i nstall any version in the following range: '>=23 <=27'. Run
$ %ANDROID_HOME%\tools\android from your command-line to install
required An droid Build Tools.
You need to have Android SDK 22 or later and the latest Android
Support Reposito ry installed on your system. Run $
%ANDROID_HOME%\tools\android to manage the Android Support Repository.
I have installed the required sdk and i am still getting the same error message and every time i execute this script in the console, it takes like forever to complete:
"%ANDROID_HOME%\tools\bin\sdkmanager" "tools" "platform-tools"
"platforms;android-25" "build-tools;25.0.2"
"extras;android;m2repository" "extras;google;m2repository"

How can I build Ionic3 angular4 hybrid application as ios .ipa file?

I am using a windows machine. So I have installed MAC OS sierra using VMWare in the same machine.
I have developed a Ionic3 Angular4 application with Cordova.
I have successfully created the .apk file using the command "ionic cordova build/run android" in my Windows.
So now I want to generate .ipa file. So I just moved the entire project to my MAC OS box. Then installed cordova & Ionic.
Now I am trying to build using command "ionic cordova build/run ios"
But getting the below error
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer
directory '/Library/Developer/CommandLineTools' is a command line tools instance
So executed sudo xcode-select -s /Applications/Xcode.app/Contents/Developer.
But got error /Applications/Xcode.app/Contents/Developer” does not exist
How can overcome these errors and build my ios .ipa file?
Note: Xcode not installed manually. But installed the Xcode via Terminal (a popup opened and asked to install xcode. So clicked install button. Finally It showed Xcode installed successfully)
You will have to install xcode. See the cordova platform guide for iOS. And you will also need the xcode commandline-tools (which you already installed). If you want to run you application in a simulator you will also have to install ios-sim (sudo npm install -g ios-sim#latest). And for deploying your application to a real device ios-deploy (sudo npm install -g ios-deploy#latest)

Building app from the cordova cli fails

Here's what I have installed on my machine:
cordova CLI: 6.5.0
Ionic CLI Version: 2.1.17
Ionic App Lib Version: 2.1.7
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.11.0
Xcode version: Not installed
I'm writing an app with ionic 1.3.3 angular 1.5.3 and cordova 6.5
When I run this command:
cordova build windows --appx=uap
I get this error:
Processing settings for platform: windows
Building project:
C:\Users\aubrey\Source\Repos\SelfServiceApp\SelfServiceApp\platforms\windows\CordovaApp.Windows10.jsproj
Configuration : debug
Platform : anycpu
C:\Users\aubrey\Source\Repos\SelfServiceApp\SelfServiceApp\platforms\windows\CordovaApp.Windows10.jsproj(61,5): error M
SB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Microsoft.VisualStudio..Defau
lt.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk
.
Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe: Command failed with exit code 1
I'm not sure why it doesn't work. The android build works.
It could be because the dependent plugin's source files are not set as "Content" type. Using cordova-windows version 5.0.0 might solve your error.

Xamarin build fails with an unknown error

I installed Xamarin and was attempting to compile and run an empty app, but the compilation fails with an unknown error:
How can I fix this error?
Install the Xamarin Android Player and select it from the devices list instead of Nexus 10 Android 3.0
Download link, Installation guide

IOS emulator working app is not installed on it

I have started the IOS emulator through apache cordova CLI and it works, says the build is successful. I can interact with the emulator however my app is not installed on it?
Is there a command that im missing to install my app on this emulated device?
Thanks
To build
cordova build ios
To run in emulator
cordova emulate ios
To run in device
cordova run ios
It might be a bug in Cordova CMD. Try the following commands from your project root directory:
1) cordova build --emulator
2) ios-sim launch platforms/ios/build/emulator/<your_app_name>.app --devicetypeid "com.apple.CoreSimulator.SimDeviceType.iPhone-5s, 8.1"
If you don't have ios-sim install it: npm install -g ios-sim

Resources