chemerisuk / cordova-plugin-firebase-config

Cordova plugin for Firebase Remote Config

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't build with error "cannot find symbol"

newuser44 opened this issue · comments

Took a day to upgrade to cordova 9.0.0 and nodejs to 14+ to be able to use this plugin.
Had to add a bunch of modules manually, not sure why. ---

Trying to build dev android app fails

> Task :app:compileDebugJavaWithJavac FAILED
/home/app/dev/Ionic-app/apps/gf-mobile-mobileapps/card-control/platforms/android/app/src/main/java/org/apache/cordova/firebase/FirebasePlugin.java:638: error: cannot find symbol
                    final boolean activated = FirebaseRemoteConfig.getInstance().activateFetched();
                                                                                                                      ^

  symbol:   method activateFetched()

  location: class FirebaseRemoteConfig
/home/app/dev/Ionic-app/apps/gf-mobile-mobileapps/card-control/platforms/android/app/src/main/java/org/apache/cordova/firebase/FirebasePlugin.java:684: error: cannot find symbol

                    byte[] bytes = FirebaseRemoteConfig.getInstance().getByteArray(key);

                                                                                                     ^

Not sure what else to try?

Strange, some reason its use the wrong file for this plugin. Is this a problem in the ionic plugin, I'm using
"@ionic-native/firebase-config": "^4.20.0",

When it builds its using app/card-control/platforms/android/app/src/main/java/org/apache/cordova/firebase FirebasePlugin.java
When it should be using
app/card-control/platforms/android/app/src/main/java/by/chemerisuk/cordova/firebase
FirebaseConfigPlugin.java

I guess I'll copy it over the files and see what happens?

Must be scanning to look for these files, I renamed it and moved the old one and it still found it.
Scanning the wrong directory?

Finding old files.

/platforms/android/app/src/main/java/org/apache/cordova/firebase/FirebasePlugin.java:18: error: class FirebaseConfigPlugin is public, should be declared in a file named FirebaseConfigPlugin.java
public class FirebaseConfigPlugin extends ReflectiveCordovaPlugin {
^
/home/app/dev/Ionic-app/apps/gf-mobile-mobileapps/card-control/platforms/android/app/src/main/java/org/apache/cordova/firebase/OnNotificationOpenReceiver.java:22: error: cannot find symbol
FirebasePlugin.sendNotification(data, context);
^
symbol: variable FirebasePlugin