cli icon indicating copy to clipboard operation
cli copied to clipboard

Cannot invoke method isEmpty() on null object

Open kukuandroid opened this issue 4 years ago • 5 comments
trafficstars

Environment

RN : 0.63 MacOS : BigSur

Description

Cannot invoke method isEmpty() on null object

Cannot invoke method isEmpty() on null object

Reproducible Demo

kukuandroid avatar Oct 25 '21 21:10 kukuandroid

I've found a workaround by editing /node_modules/@react-native-community/cli-platform-android/native_modules.gradle Line 275

-         if (!androidConfig["buildTypes"].isEmpty()) {
+         if (androidConfig["buildTypes"] && !androidConfig["buildTypes"].isEmpty()) {

samuelscheit avatar Nov 06 '21 20:11 samuelscheit

@thymikee Unfortunately, we faced with the same issue in lib version 6.2.0. The problem is in line 275.

Environment: Android Studio: Artic Fox 2020| 3.1.0 Patch 3 ANDROID GRADLE PLUGIN: 7.0+ minSdk : 21 targetSdk : 30, compileSdk : 30

DevAnatolii avatar Nov 17 '21 12:11 DevAnatolii

@Flam3rboy your workaround works, but it would be great if we had this line updated in the library

FYI @thymikee @DevAnatolii

i-petro avatar Nov 17 '21 12:11 i-petro

@i-petro PR welcome! :)

thymikee avatar Nov 17 '21 14:11 thymikee

When will this fix be released?

DevAnatolii avatar Dec 02 '21 12:12 DevAnatolii