Building app from the cordova cli fails - windows

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.

Related

Unable to build my (vuejs + capacitor) app with Xcode

I'm learning to use vueJs/Capacitor to build an app for Android & IOS.
I succeed to build the Android version, but I'm blocked with the IOS version. I tried to many way since yesterday ....
I'm working under Window 11 & vmWare - MacOS 12.
Under W11 :
npm install #capacitor/ios
npx cap add ios
npm run build
npx cap sync
copy the ./myProject/ios folder to the shared folder
Under MacOS :
opened App.xcworkspace
launched build and got the bellow error
If somebody is able to help :)
Edit :
npx cap doctor (under Windows 11)
Latest Dependencies:
#capacitor/cli: 3.3.3
#capacitor/core: 3.3.3
#capacitor/android: 3.3.3
#capacitor/ios: 3.3.3
Installed Dependencies:
#capacitor/cli: 3.3.3
#capacitor/ios: 3.3.3
#capacitor/core: 3.3.3
#capacitor/android: 3.3.3
[success] Android looking great! 👌
[error] Xcode is not installed
Issue resolved by :
Reinstallations of Ruby / curl / cocoapods
error verify_xcode_license_approved! : https://stackoverflow.com/a/60546847/3355901 (solution work with a simple command shell and not with powershell)
Could not open library 'libcurl' : https://stackoverflow.com/a/54520917/3355901
Unable to add a source with url https://cdn.cocoapods.org/ named trunk : https://stackoverflow.com/a/61179841/3355901 & https://stackoverflow.com/a/47138575/3355901

Xcode XCBuild support error for ionic build

I have a ionic project that I am trying to build on iOS.
When running ionic build ios, it gives this error:
FIXME: Implement XCBuild support for macros in overriding parameters
with condition sets:
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer
Error: Error code 1 for command: xcodebuild with args:
-xcconfig,/Users/Person/ProjectA/platforms/ios/cordova/build-debug.xcconfig,-project,ProjectA.xcodeproj,ARCHS=i386,-target,ProjectA,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/Person/ProjectA/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/Person/ProjectA/platforms/ios/build/sharedpch
I have tried:
Remove platform and add platform
Change CODE_SIGN_IDENTITY[sdk=iphoneos*] from iPhone Distributor to iPhone Developer in build-release.xcconfig
Re-did signing from xcode to try both automatic and manual signing
but all were not successful.
I am running:
Cordova CLI: 6.1.1
Ionic Framework Version: 2.0.0-beta.4
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.0.0-beta.20
ios-deploy version: 1.9.4
ios-sim version: 5.0.8
Node Version: v4.4.7
Xcode version: Xcode 11.1 Build version 11A1027
It is an old ionic version but able to run on my old macbook air (OS: High Sierra). I am now using a new macbook air (OS: Mojave) and trying to setup the environment.
Any suggestions?
I was getting this error after re-adding the iOS platform to my project with cordova#8.1.2/cordova-ios#4.5.4, even with a build.json file included in my project. I manually upgraded to cordova-ios#5.1.1 (by specifying the version in the cordova platforms add ios#5 command) and the error went away.

Ionic App Built on Mac won’t build on Windows

We developed the app on a Mac, initially. Moved the code over to a Windows 10 machine to compile to run on Windows. However, in the build process I'm getting this error at the end:
Command finished with error code 0: C:\windows\system32\reg.exe query,HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0,/v,MSBuildToolsPath
Found MSBuild v4.0 at C:\Windows\Microsoft.NET\Framework64\v4.0.30319\
Using MSBuild v4.0 from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\
MSBuild v4.0 is not supported, aborting.
Error: AppPackages doesn't exists
Here's Ionic Info
global packages:
#ionic/cli-utils : 1.3.0
Cordova CLI : 7.0.1
Ionic CLI : 3.3.0
local packages:
#ionic/app-scripts : 1.3.7
#ionic/cli-plugin-cordova : 1.3.0
#ionic/cli-plugin-ionic-angular : 1.3.0
Cordova Platforms : windows 5.0.0
Ionic Framework : ionic-angular 3.3.0
System:
Node : v6.10.3
OS : Windows 10
Xcode : not installed
ios-deploy : not installed
ios-sim : not installed
We're using Visual Studio Community 2017. I've tried installing everything under the sun for VS and I can't seem to get past this. I've read tons of pages and sites, tried everything I can find and no go.
Not sure what to do next. I've thought about starting a new app on the Windows machine and just copy my code into and see if that works. It seems like a lot of wasted time to me though.
My advice on this is just a simple one. Install and run your project with Visual Studio Code. It was built and well suited for free and open frameworks like Ionic. This is what I work with everyday. When you do that give me a comment below if you have any problem.

No folder platforms on Ionic project

I've done the following steps :
create ionic project with command : run ionic start myApp tabs
add platform on ionic project with command : ionic platform add ios, ionic platform add android
I can't find the platforms folder on my project structure
This is my project sructure :
bower.json
config.xml
gulpfile.js
hooks
ionic.project
package.json
README.md
resources
scss
www
This is my ionic info :
Cordova CLI: 5.4.1
Ionic CLI Version: 1.7.13
Ionic App Lib Version: 0.6.5
ios-deploy version: 1.8.4
ios-sim version: 5.0.6
OS: Mac OS X El Capitan
Node Version: v5.4.1
Xcode version: Xcode 7.2 Build version 7C68
My question :
Where is the platforms folder ?
The platforms folder can't created when i create project in this directory :
~/Documents/TESTING Projects/IONIC
I tried to change my directory to : ~/Documents/IONIC, and everything working as expected

ionic build android command not working

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

Resources