react-native-scoped-storage icon indicating copy to clipboard operation
react-native-scoped-storage copied to clipboard

Unable to run in Android.

Open gkasireddy202 opened this issue 1 year ago • 3 comments

Hi,

I updated my react-native project to minSdkVersion = 26 compileSdkVersion = 33 and targetSdkVersion = 33. I am getting the below error in Android. error: lambda expressions are not supported in -source 7 AsyncTask.execute(() -> { ^ (use -source 8 or higher to enable lambda expressions)

/node_modules/react-native-scoped-storage/android/src/main/java/com/ammarahmed/scopedstorage/RNScopedStorageModule.java:817

react-native-cli: 2.0.1 react-native: 0.68.7

gkasireddy202 avatar Jun 02 '23 11:06 gkasireddy202

Hi, You can try to change "Source Compatibility" and "Target Compatibility" of module in Android Studio.

Project Structure -> Modules

kondziu95 avatar Jun 02 '23 12:06 kondziu95

Hi,

Screenshot 2023-06-02 at 6 14 49 PM

I am having a JavaVersion.VERSION_1_8 for Source Compatibility and Target Compatibility of the module in Android Studio.

gkasireddy202 avatar Jun 02 '23 12:06 gkasireddy202

The same error for me with JAVA compat 1.8

eakarpov avatar Sep 04 '24 20:09 eakarpov