MobbScan React Native SDK: Troubleshooting
ANDROID_SDK_HOME not found
error
Solve If a problem appears telling that ANDROID_SDK_HOME
is not found, create a android/local.properties
file and add the following line:
sdk.dir=path/to/your/android/sdk
Reinstalling MobbScan SDK after an installation failure
If there is a problem during the MobbScan SDK installation, just remove its folder (node_modules/@mobbeel/react-native-mobbscan
) and run again npm install
.
androidx.* does not exist
error
Solve If an error of this type occurs during the building referring to one of MobbScan SDK files, ensure that your JDK version is the proper one for your project and reinstall MobbScan SDK as described in the section Reinstalling MobbScan SDK after a failure.
AndroidX compatibility issues
If your Android project uses AndroidX, errors similar to the following could appear in the assembleRelease
step:
package android.support.annotation does not exist
import android.support.annotation.Nullable;
To fix them you should add Jetifier for React Native in your project:
$ npm install --save-dev jetifier
$ npx jetify
After that, the errors should be gone. It is highly recommended to add the jetify
call in your NPM postInstall
to avoid its manual execution.