This is not working for me. I have changed the project.properties and when running
ionic cordova run android
I am still getting these errors:
D:\ionic\switch_ionic4\platforms\android\app\src\main\java\org\apache\cordova\firebase\FirebasePluginInstanceIDService.java:6: error: cannot find symbol
import com.google.firebase.iid.FirebaseInstanceIdService;
^
symbol: class FirebaseInstanceIdService
location: package com.google.firebase.iid
D:\ionic\switch_ionic4\platforms\android\app\src\main\java\org\apache\cordova\firebase\FirebasePluginInstanceIDService.java:8: error: cannot find symbol
public class FirebasePluginInstanceIDService extends FirebaseInstanceIdService {
^
symbol: class FirebaseInstanceIdService
D:\ionic\switch_ionic4\platforms\android\app\src\main\java\org\apache\cordova\firebase\FirebasePlugin.java:610: error: method getByteArray in class FirebaseRemoteConfig cannot be applied to given types;
: FirebaseRemoteConfig.getInstance().getByteArray(key, namespace);
^
required: String
found: String,String
reason: actual and formal argument lists differ in length
D:\ionic\switch_ionic4\platforms\android\app\src\main\java\org\apache\cordova\firebase\FirebasePlugin.java:629: error: method getValue in class FirebaseRemoteConfig cannot be applied to given types;
: FirebaseRemoteConfig.getInstance().getValue(key, namespace);
^
required: String
found: String,String
reason: actual and formal argument lists differ in length
D:\ionic\switch_ionic4\platforms\android\app\src\main\java\org\apache\cordova\firebase\FirebasePlugin.java:686: error: no suitable method found for setDefaults(Map<String,Object>,String)
FirebaseRemoteConfig.getInstance().setDefaults(defaultsToMap(defaults), namespace);
^
method FirebaseRemoteConfig.setDefaults(Map<String,Object>) is not applicable
(actual and formal argument lists differ in length)
method FirebaseRemoteConfig.setDefaults(int) is not applicable
(actual and formal argument lists differ in length)
D:\ionic\switch_ionic4\platforms\android\app\src\main\java\org\apache\cordova\firebase\FirebasePlugin.java:885: error: cannot find symbol
myTrace.incrementCounter(counterNamed);
^
symbol: method incrementCounter(String)
location: variable myTrace of type Trace
D:\ionic\switch_ionic4\platforms\android\app\src\main\java\org\apache\cordova\firebase\FirebasePluginInstanceIDService.java:17: error: method does not override or implement a method from a supertype
@Override
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: D:\ionic\switch_ionic4\platforms\android\app\src\main\java\nl\xservices\plugins\SocialSharing.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
7 errors
:app:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
my package.json looks like this:
{
"name": "switch_ionic4",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/common": "^7.2.2",
"@angular/core": "^7.2.2",
"@angular/forms": "^7.2.2",
"@angular/http": "^7.2.2",
"@angular/platform-browser": "^7.2.2",
"@angular/platform-browser-dynamic": "^7.2.2",
"@angular/router": "^7.2.2",
"@ionic-native/app-version": "^5.2.0",
"@ionic-native/badge": "^5.2.0",
"@ionic-native/core": "^5.0.0",
"@ionic-native/firebase": "^5.2.0",
"@ionic-native/in-app-browser": "^5.2.0",
"@ionic-native/launch-navigator": "^5.4.0",
"@ionic-native/social-sharing": "^5.2.0",
"@ionic-native/splash-screen": "^5.0.0",
"@ionic-native/status-bar": "^5.0.0",
"@ionic/angular": "^4.1.2",
"@ionic/core": "^4.1.2",
"@ionic/storage": "^2.2.0",
"@ngx-translate/core": "^11.0.1",
"@ngx-translate/http-loader": "^4.0.0",
"angular2-moment": "^1.9.0",
"chart.js": "^2.7.3",
"chartjs-plugin-labels": "^1.1.0",
"cordova-android": "7.1.4",
"cordova-ios": "4.5.5",
"cordova-plugin-actionsheet": "^2.3.3",
"cordova-plugin-app-version": "0.1.9",
"cordova-plugin-badge": "0.8.8",
"cordova-plugin-device": "2.0.2",
"cordova-plugin-dialogs": "^2.0.1",
"cordova-plugin-firebase": "2.0.5",
"cordova-plugin-inappbrowser": "3.0.0",
"cordova-plugin-ionic-keyboard": "^2.0.5",
"cordova-plugin-ionic-webview": "^3.0.0",
"cordova-plugin-splashscreen": "5.0.2",
"cordova-plugin-statusbar": "2.4.2",
"cordova-plugin-whitelist": "1.3.3",
"cordova-plugin-x-socialsharing": "5.4.4",
"cordova-sqlite-storage": "3.2.0",
"core-js": "^2.5.4",
"es6-promise-plugin": "^4.2.2",
"g": "^2.0.1",
"ionic": "^4.12.0",
"moment": "^2.24.0",
"rxjs": "~6.3.3",
"uk.co.workingedge.phonegap.plugin.launchnavigator": "5.0.4",
"zone.js": "~0.8.29"
},
"devDependencies": {
"@angular-devkit/architect": "~0.12.3",
"@angular-devkit/build-angular": "^0.13.8",
"@angular-devkit/core": "~7.2.3",
"@angular-devkit/schematics": "~7.2.3",
"@angular/cli": "~7.3.1",
"@angular/compiler": "~7.2.2",
"@angular/compiler-cli": "~7.2.2",
"@angular/language-service": "~7.2.2",
"@ionic/angular-toolkit": "~1.4.0",
"@ionic/lab": "1.0.24",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~10.12.0",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~3.1.4",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"ts-node": "~8.0.0",
"tslint": "~5.12.0",
"typescript": "~3.1.6"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-sqlite-storage": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-app-version": {},
"cordova-plugin-x-socialsharing": {
"ANDROID_SUPPORT_V4_VERSION": "24.1.1+"
},
"uk.co.workingedge.phonegap.plugin.launchnavigator": {
"GOOGLE_API_KEY_FOR_ANDROID": "{your_api_key}",
"OKHTTP_VERSION": "3.+",
"LOCATION_USAGE_DESCRIPTION": "This app requires access to your location for navigation purposes"
},
"cordova-plugin-firebase": {
"IOS_HIDE_FOREGROUND_NOTIFICATION": "true"
},
"cordova-plugin-badge": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-ionic-keyboard": {}
},
"platforms": [
"ios",
"android"
]
}
}