1
votes

I installed https://github.com/phonegap/phonegap-plugin-push to have push notifications in my app. When building I get this errors:

H:\T2S\platforms\android\src\com\adobe\phonegap\push\GCMIntentService.java:390: cannot find symbol symbol : variable M location: class android.os.Build.VERSION_CODES Log.d(LOG_TAG, "Version: " + android.os.Build.VERSION.SDK_INT + " = " + android.os.Build.VERSION_CODES.M); ^ H:\T2S\platforms\android\src\com\adobe\phonegap\push\GCMIntentService.java:391: cannot find symbol symbol : variable M location: class android.os.Build.VERSION_CODES if (android.os.Build.VERSION.SDK_INT <= android.os.Build.VERSION_CODES.M) { ^ H:\T2S\platforms\android\src\com\adobe\phonegap\push\GCMIntentService.java:401: cannot find symbol symbol : variable M location: class android.os.Build.VERSION_CODES if (android.os.Build.VERSION.SDK_INT <= android.os.Build.VERSION_CODES.M) { ^ Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 3 errors

cordova -version: 6.3.0

java -version: 1.8.0_73

I have also installed the latest Packages in SDK of: Android Support Repository; Google Play Services; Google Repository

2
How do you add plugin? Can you show the code? - Den Kison

2 Answers

0
votes

Could be a plugin has the wrong version. Here is the easiest way to reinstall all the cordova plugins:

npm install -g cordova-plugins-reinstall

cdv-reinstall
-2
votes

Thanks for the comment but the problem is solved ;) I used the wrong version of the plugin