I try to create ionic 2 app with below steps:
1- npm install -g cordova
2- npm install -g ionic
3- npm install -g typescript
4- ionic start sampleApp tutorial --v2
for serve and see in browser use this command :
ionic serve
for build android apk file download jdk 8 and android sdk manager and install all api and set ANDROID-HOME and after use this command :
ionic platform add android
ionic build android
every things is ok and work very well but I want give GPS state and for this reason add cordova.plugins.diagnostic
with this command :
ionic plugin add cordova.plugins.diagnostic
npm install --save @ionic-native/diagnostic
but after add diagnostic plugin and run ionic build android
console give me error and build failed .I search in google and find this page :
Ionic android build fails, no matches found
and this pages :
https://forum.ionicframework.com/t/build-failed-android/38071/6
but I don't know how to solve this problem
my project and system info:
ordova CLI: 6.5.0
Ionic Framework Version: 3.0.1
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.3.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 8.1
Node Version: v6.10.0
Xcode version: Not installed
<preference name="android-minSdkVersion" value="19" />
<preference name="android-targetSdkVersion" value="23" />