Is this library compatible with latest RN version (60.4)?
I keep getting a react native native module cannot be null error when I try to setup this package in my project.
I was able to fix this by downgrading RN version to 59.3, but I just want to be sure If it's just not compatible with 60.4 yet, or I'm missing something.
I get the same errors with react-native 0.60.5.
> Task :react-native-ble-plx:compileReleaseJavaWithJavac FAILED
/Users/vsts/agent/2.155.1/work/1/s/node_modules/react-native-ble-plx/android/src/main/java/com/polidea/reactnativeble/converter/RxBleScanResultConverter.java:3: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
^
/Users/vsts/agent/2.155.1/work/1/s/node_modules/react-native-ble-plx/android/src/main/java/com/polidea/reactnativeble/wrapper/Characteristic.java:5: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
^
/Users/vsts/agent/2.155.1/work/1/s/node_modules/react-native-ble-plx/android/src/main/java/com/polidea/reactnativeble/wrapper/Service.java:5: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
^
...
How can this be solved?
I get the same errors with react-native 0.60.5.
> Task :react-native-ble-plx:compileReleaseJavaWithJavac FAILED /Users/vsts/agent/2.155.1/work/1/s/node_modules/react-native-ble-plx/android/src/main/java/com/polidea/reactnativeble/converter/RxBleScanResultConverter.java:3: error: package android.support.annotation does not exist import android.support.annotation.NonNull; ^ /Users/vsts/agent/2.155.1/work/1/s/node_modules/react-native-ble-plx/android/src/main/java/com/polidea/reactnativeble/wrapper/Characteristic.java:5: error: package android.support.annotation does not exist import android.support.annotation.NonNull; ^ /Users/vsts/agent/2.155.1/work/1/s/node_modules/react-native-ble-plx/android/src/main/java/com/polidea/reactnativeble/wrapper/Service.java:5: error: package android.support.annotation does not exist import android.support.annotation.NonNull; ^ ...How can this be solved?
I wasn't able to resolve it on React Native versions above 0.59.3, I think thats the latest version that this library supports.
It's mentioned in README file:
npm install --save-dev jetifierjetify script after npm install. You can do it by adding "postinstall" script to the package.json file:json
...
"postinstall": "npx jetify",
...
Did you try that?
If you're using yarn workspaces, you may need to add the library in the nohoist section of the projects package.json.:
"workspaces": {
"nohoist": [
...
"react-native-ble-plx",
"react-native-ble-plx/**",
...
]
}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Any solution for that? I have the same issue.
As same for me with this commands :
react-native link react-native-ble-plx
npm run postinstall; npm run android
Most helpful comment
It's mentioned in README file:
npm install --save-dev jetifierjetifyscript afternpm install. You can do it by adding "postinstall" script to thepackage.jsonfile:json ... "postinstall": "npx jetify", ...Did you try that?