Trying to run a project on react-native 0.55.2 using "react-native run-android" but getting the following error
Configure project :rn-fetch-blob
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported
> Task :react-native-ble-manager:compileDebugJavaWithJavac FAILED
E:\premisehq-mobile-react-native\node_modules\react-native-ble-manager\android\src\main\java\it\innove\LollipopPeripheral.java:7: error: cannot find symbol
import android.support.annotation.RequiresApi;
^
symbol: class RequiresApi
location: package android.support.annotation
E:\premisehq-mobile-react-native\node_modules\react-native-ble-manager\android\src\main\java\it\innove\LollipopPeripheral.java:17: error: cannot find symbol
@RequiresApi(Build.VERSION_CODES.LOLLIPOP)
^
symbol: class RequiresApi
E:\premisehq-mobile-react-native\node_modules\react-native-ble-manager\android\src\main\java\it\innove\LollipopScanManager.java:11: error: cannot find symbol
import android.support.annotation.RequiresApi;
^
symbol: class RequiresApi
location: package android.support.annotation
E:\premisehq-mobile-react-native\node_modules\react-native-ble-manager\android\src\main\java\it\innove\LollipopScanManager.java:20: error: cannot find symbol
@RequiresApi(Build.VERSION_CODES.LOLLIPOP)
^
symbol: class RequiresApi
Note: E:\premisehq-mobile-react-native\node_modules\react-native-ble-manager\android\src\main\java\it\innove\LegacyScanManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
4 errors
FAILURE: Build failed with an exception.
I faced same problem few months back. There was a difference in Android SDK. Try to find out the targeting version of SDK in build.gradle. The version of Android SDK and app's targeting version should be same. Hope this will help you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With