X-Guard / react-native-flic2

Use Flic 2 within your React Native application with ease.
Other
8 stars 9 forks source link

Error after upgrading to Android 33 - package io.flic.flic2libandroid does not exist #43

Closed JB-CHAUVIN closed 6 months ago

JB-CHAUVIN commented 10 months ago

Hello,

I upgraded to target SDK 33 with Android and I can't build anymore this lib.

Please find attached the stack trace.

For information, I tried the latest 6 versions of this lib and none are working.

Does anyone is facing the same issue ?

Best regards

  symbol:   class Flic2Button
  location: class ReactFlic2ButtonListener
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/model/ReactFlic2ButtonListener.java:31: error: cannot find symbol
    public void onFailure(Flic2Button button, int errorCode, int subCode) {
                          ^
  symbol:   class Flic2Button
  location: class ReactFlic2ButtonListener
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/model/ReactFlic2ButtonListener.java:37: error: cannot find symbol
    public void onReady(Flic2Button button, long timestamp) {
                        ^
  symbol:   class Flic2Button
  location: class ReactFlic2ButtonListener
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/model/ReactFlic2ButtonListener.java:43: error: cannot find symbol
    public void onUnpaired(Flic2Button button) {
                           ^
  symbol:   class Flic2Button
  location: class ReactFlic2ButtonListener
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/model/ReactFlic2ButtonListener.java:49: error: cannot find symbol
    public void onButtonClickOrHold(Flic2Button button, boolean wasQueued, boolean lastQueued, long timestamp, boolean isClick, boolean isHold) {
                                    ^
  symbol:   class Flic2Button
  location: class ReactFlic2ButtonListener
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/model/ReactFlic2ButtonListener.java:60: error: cannot find symbol
    public void onButtonUpOrDown(final Flic2Button button, boolean wasQueued, boolean lastQueued, long timestamp, boolean isUp, boolean isDown) {
                                       ^
  symbol:   class Flic2Button
  location: class ReactFlic2ButtonListener
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/model/ReactFlic2ButtonListener.java:72: error: cannot find symbol
    public void onButtonSingleOrDoubleClick(Flic2Button button, boolean wasQueued, boolean lastQueued, long timestamp, boolean isSingleClick, boolean isDoubleClick) {
                                            ^
  symbol:   class Flic2Button
  location: class ReactFlic2ButtonListener
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/model/ReactFlic2ButtonListener.java:81: error: cannot find symbol
    public void onButtonSingleOrDoubleClickOrHold(Flic2Button button, boolean wasQueued, boolean lastQueued, long timestamp, boolean isSingleClick, boolean isDoubleClick, boolean isHold) {
                                                  ^
  symbol:   class Flic2Button
  location: class ReactFlic2ButtonListener
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/model/ReactFlic2ButtonListener.java:92: error: cannot find symbol
    public void onFirmwareVersionUpdated(Flic2Button button, int newVersion) {
                                         ^
  symbol:   class Flic2Button
  location: class ReactFlic2ButtonListener
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/model/ReactFlic2ButtonListener.java:97: error: cannot find symbol
    public void onNameUpdated(Flic2Button button, String newName) {
                              ^
  symbol:   class Flic2Button
  location: class ReactFlic2ButtonListener
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/model/ReactFlic2ButtonListener.java:102: error: cannot find symbol
    public void onBatteryLevelUpdated(Flic2Button button, BatteryLevel level) {
                                      ^
  symbol:   class Flic2Button
  location: class ReactFlic2ButtonListener
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/model/ReactFlic2ButtonListener.java:102: error: cannot find symbol
    public void onBatteryLevelUpdated(Flic2Button button, BatteryLevel level) {
                                                          ^
  symbol:   class BatteryLevel
  location: class ReactFlic2ButtonListener
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/model/ReactFlic2ScanCallback.java:5: error: package io.flic.flic2libandroid does not exist
import io.flic.flic2libandroid.Flic2Button;
                              ^
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/model/ReactFlic2ScanCallback.java:6: error: package io.flic.flic2libandroid does not exist
import io.flic.flic2libandroid.Flic2ScanCallback;
                              ^
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/model/ReactFlic2ScanCallback.java:10: error: cannot find symbol
public class ReactFlic2ScanCallback implements Flic2ScanCallback {
                                               ^
  symbol: class Flic2ScanCallback
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/model/ReactFlic2ScanCallback.java:13: error: cannot find symbol
    Consumer<Flic2Button> mAddFlic2ButtonConsumer;
             ^
  symbol:   class Flic2Button
  location: class ReactFlic2ScanCallback
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/model/ReactFlic2ScanCallback.java:15: error: cannot find symbol
    public ReactFlic2ScanCallback(Consumer<Flic2Button> addFlic2ButtonConsumer) {
                                           ^
  symbol:   class Flic2Button
  location: class ReactFlic2ScanCallback
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/model/ReactFlic2ScanCallback.java:20: error: cannot find symbol
    public void onDiscoveredAlreadyPairedButton(Flic2Button button) {
                                                ^
  symbol:   class Flic2Button
  location: class ReactFlic2ScanCallback
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/model/ReactFlic2ScanCallback.java:38: error: cannot find symbol
    public void onComplete(int result, int subCode, Flic2Button button) {
                                                    ^
  symbol:   class Flic2Button
  location: class ReactFlic2ScanCallback
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/model/NullReactFlic2Manager.java:5: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.WritableArray;
                                ^
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/model/NullReactFlic2Manager.java:6: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.WritableNativeArray;
                                ^
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/model/NullReactFlic2Manager.java:62: error: cannot find symbol
    public WritableArray getButtons() {
           ^
  symbol:   class WritableArray
  location: class NullReactFlic2Manager
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/model/ReactLogger.java:5: error: package io.flic.flic2libandroid does not exist
import io.flic.flic2libandroid.LoggerInterface;
                              ^
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/model/ReactLogger.java:7: error: cannot find symbol
public class ReactLogger implements LoggerInterface {
                                    ^
  symbol: class LoggerInterface
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/model/ReactAndroidHandler.java:5: error: package io.flic.flic2libandroid does not exist
import io.flic.flic2libandroid.HandlerInterface;
                              ^
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/model/ReactAndroidHandler.java:7: error: cannot find symbol
public class ReactAndroidHandler implements HandlerInterface {
                                            ^
  symbol: class HandlerInterface
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/communication/ReactEvent.java:5: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReactContext;
                                ^
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/communication/ReactEvent.java:6: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.WritableMap;
                                ^
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/communication/ReactEvent.java:7: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.WritableNativeMap;
                                ^
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/communication/ReactEvent.java:8: error: package com.facebook.react.modules.core does not exist
import com.facebook.react.modules.core.DeviceEventManagerModule;
                                      ^
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/communication/ReactEvent.java:10: error: package io.flic.flic2libandroid does not exist
import io.flic.flic2libandroid.BatteryLevel;
                              ^
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/communication/ReactEvent.java:11: error: package io.flic.flic2libandroid does not exist
import io.flic.flic2libandroid.Flic2Button;
                              ^
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/communication/IReactEvent.java:3: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.WritableMap;
                                ^
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/communication/IReactEvent.java:5: error: package io.flic.flic2libandroid does not exist
import io.flic.flic2libandroid.Flic2Button;
                              ^
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/communication/ReactEvent.java:51: error: cannot find symbol
    private ReactContext mReactContext;
            ^
  symbol:   class ReactContext
  location: class ReactEvent
/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/src/main/java/nl/xguard/flic2/communication/ReactEvent.java:55: error: cannot find symbol
    public static IReactEvent createInstance(ReactContext reactContext) {
                                             ^
  symbol:   class ReactContext
  location: class ReactEvent
100 errors

> Task :react-native-flic-nonpbf:generateReleaseUnitTestStubRFile
> Task :react-native-flic-nonpbf:verifyReleaseResources
> Task :react-native-flic-nonpbf:generateDebugUnitTestStubRFile
> Task :react-native-flic-nonpbf:javaPreCompileReleaseUnitTest

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-flic2:androidJavadoc'.
> Javadoc generation failed. Generated Javadoc options file (useful for troubleshooting): '/Users/cegedim/Documents/Perso/Perso/rallyerec/node_modules/react-native-flic2/android/build/tmp/androidJavadoc/javadoc.options'

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings
jdegger commented 10 months ago

We are currently on 33 ourselves and it seems to be working fine.

      minSdkVersion       = 24
      compileSdkVersion   = 33
      targetSdkVersion    = 33
      buildToolsVersion   = "33.0.2"

The errors you're showing seem to indicate that the actual flic library is not installing properly. Even though it should not be needed, could you maybe trying to install the library by hand as instructed here? https://github.com/50ButtonsEach/flic2lib-android

Might work then, but not sure.

jdegger commented 10 months ago

Might also be related to https://github.com/X-Guard/react-native-flic2/issues/42?

JB-CHAUVIN commented 10 months ago

We are currently on 33 ourselves and it seems to be working fine.

      minSdkVersion       = 24
      compileSdkVersion   = 33
      targetSdkVersion    = 33
      buildToolsVersion   = "33.0.2"

The errors you're showing seem to indicate that the actual flic library is not installing properly. Even though it should not be needed, could you maybe trying to install the library by hand as instructed here? https://github.com/50ButtonsEach/flic2lib-android

Might work then, but not sure.

Yes, I tried to install it manually but it's not working either :( I don't understand...

JB-CHAUVIN commented 8 months ago

Hello anything new about my issue ?

jdegger commented 6 months ago

@JB-CHAUVIN Is this fixed in the newest version?

jdegger commented 6 months ago

Since you made an issue where you asked more detailed question, I suppose you got it working so I will close this issue