AgoraIO/agora-react-native-rtm

AgoraRTMModule.java:3 - Error - package android.support.annotation does not exist

fritzfr opened this issue · 3 comments

I am compiling my app via Bitrise and I am getting this compilation error:

Task :agora-react-native-rtm:compileReleaseJavaWithJavac FAILED
/bitrise/src/mobile-app/node_modules/agora-react-native-rtm/android/src/main/java/io/agora/agora_rtm/AgoraRTMModule.java:3: error: package android.support.annotation does not exist
import android.support.annotation.Nullable;
^
/bitrise/src/mobile-app/node_modules/agora-react-native-rtm/android/src/main/java/io/agora/agora_rtm/AgoraRTMModule.java:73: error: cannot find symbol
private void sendEvent(String eventName, @nullable WritableMap params) {
^
symbol: class Nullable
location: class AgoraRTMModule
2 errors
FAILURE: Build failed with an exception.

which comes from here:

Any ideas what the problem is? I have androidX and jetifier enabled:

android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true

I "fixed" this by manually executing npx jetify before making the build. I think this line needs to be migrated.

I will remove this annotation next version.

fix in 1.2.2-alpha.2