Reputation: 2146
ionic cordova plugin add cordova.plugins.diagnostic
npm install --save @ionic-native/diagnostic@4
used the above command to install diagnostic plugin inside my project
I am using a windows machine
Installed platforms:
android 6.3.0
ios 4.5.5
Available platforms:
browser ~5.0.1
osx ~4.0.1
windows ~6.0.0
cordova.plugins.diagnostic 4.0.12 "Diagnostic"
when building it shows error
com.android.ide.common.process.ProcessException: Failed to execute aapt
Upvotes: 1
Views: 643
Reputation: 2146
removed my android platform using
ionic cordova platform rm android
and added it again using
ionic cordova platform add android@latest
resulted in android 8.0.0
and when i ran the code it showed some SDK error to update license which you can easily solve by moving into android sdk location : C:\Users\username\AppData\Local\Android\sdk\tools\bin
Run command
sdkmanager --licenses
Accept the licence for SDK
Upvotes: 1