Hey all,
Bit of a long post here.
I always use the same method of doing a fresh build of my app.
Remove /node_module
, /platforms
, /plugins
and then do an npm install
.
Next, I do ionic cordova platform add android
and then when that completes, I do ionic cordova build android
…
Today when adding the platform, I got this message:
Failed to install 'cordova-plugin-ionic': CordovaError: Version of installed plugin: "cordova-plugin-ionic-webview@1.2.1" does not satisfy dependency plugin requirement "cordova-plugin-ionic-webview@>=2.0.0". Try --force to use installed plugin as dependency.
So I updated the webview plugin to version 2.0.0 and also updated cordova-android version from 6.3.0 to 6.4.0 as needed by the webview plugin. I also updated cordova-plugin-ionic to ^4.2.0.
Everything else is the same as it always is.
I do ionic cordova platform add android
and it works fine.
I do ionic cordova build android
and at the very end I get these 3 errors:
/Users/chrisv/.gradle/caches/transforms-1/files-1.1/firebase-iid-16.2.0.aar/b603d65ba3d5865eaa66240d08090b1e/jars/classes.jar(com/google/firebase/iid/FirebaseInstanceId.class): warning: Cannot find annotation method 'value()' in type 'GuardedBy': class file for javax.annotation.concurrent.GuardedBy not found
/Users/chrisv/.gradle/caches/transforms-1/files-1.1/firebase-iid-16.2.0.aar/b603d65ba3d5865eaa66240d08090b1e/jars/classes.jar(com/google/firebase/iid/FirebaseInstanceId.class): warning: Cannot find annotation method 'value()' in type 'GuardedBy'
/Users/chrisv/.gradle/caches/transforms-1/files-1.1/firebase-iid-16.2.0.aar/b603d65ba3d5865eaa66240d08090b1e/jars/classes.jar(com/google/firebase/iid/FirebaseInstanceId.class): warning: Cannot find annotation method 'value()' in type 'GuardedBy'
/Websites/project/platforms/android/src/com/ionicframework/common/IonicCordovaCommon.java:72: error: strings in switch are not supported in -source 1.6
switch(action) {
^
(use -source 7 or higher to enable strings in switch)
/Websites/project/platforms/android/src/com/ionicframework/common/IonicCordovaCommon.java:144: error: cannot find symbol
SharedPreferences prefs = this.cordova.getContext().getSharedPreferences("com.ionic.deploy.preferences", Context.MODE_PRIVATE);
^
symbol: method getContext()
location: variable cordova of type CordovaInterface
/Websites/project/platforms/android/src/com/ionicframework/common/IonicCordovaCommon.java:201: error: cannot find symbol
SharedPreferences prefs = this.cordova.getContext().getSharedPreferences("com.ionic.deploy.preferences", Context.MODE_PRIVATE);
^
symbol: method getContext()
location: variable cordova of type CordovaInterface
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors
3 warnings
FAILED
Any one have any ideas? I can’t seem to build anymore and I can’t get past this error.
Here’s my ionic info
if it helps:
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 3.1.11
Cordova Platforms : android 6.4.0
Ionic Framework : ionic-angular 3.8.0
System:
ios-deploy : 1.9.2
ios-sim : 5.0.6
Node : v8.9.1
npm : 6.1.0
OS : macOS High Sierra
Xcode : Xcode 9.4.1 Build version 9F2000
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
Thanks for reading, I know it’s a long one.