I am running into an annoying issue (Android only) for a couple of days now.
This has seemed to happen suddenly. And I can't get around this issue. Please see below my gradle project:
buildscript { ext { buildToolsVersion = "28.0.3" minSdkVersion = 16 compileSdkVersion = 28 targetSdkVersion = 27 supportLibVersion = "28.0.0" } repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.5.0' classpath 'com.google.gms:google-services:4.3.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files }}allprojects { repositories { mavenLocal() google() jcenter() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$rootDir/../node_modules/react-native/android" } }}wrapper { gradleVersion = '4.7' distributionUrl = distributionUrl.replace("bin", "all")}
and now my gradle app:
apply plugin: "com.android.application"import com.android.build.OutputFileproject.ext.react = [ entryFile: "index.js"]apply from: "../../node_modules/react-native/react.gradle"def enableSeparateBuildPerCPUArchitecture = falsedef enableProguardInReleaseBuilds = falseandroid { compileSdkVersion rootProject.ext.compileSdkVersion defaultConfig { applicationId "com.my app" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 110000 versionName "1.1.0" } signingConfigs { release { if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) { storeFile file(MYAPP_RELEASE_STORE_FILE) storePassword MYAPP_RELEASE_STORE_PASSWORD keyAlias MYAPP_RELEASE_KEY_ALIAS keyPassword MYAPP_RELEASE_KEY_PASSWORD } } } splits { abi { reset() enable enableSeparateBuildPerCPUArchitecture universalApk false // If true, also generate a universal APK include "armeabi-v7a", "x86", "arm64-v8a" } } buildTypes { release { minifyEnabled enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" signingConfig signingConfigs.release } } // applicationVariants are e.g. debug, release applicationVariants.all { variant -> variant.outputs.each { output -> def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3] def abi = output.getFilter(OutputFile.ABI) if (abi != null) { // null for the universal-debug, universal-release variants output.versionCodeOverride = versionCodes.get(abi) * 1048576 + defaultConfig.versionCode } } } buildToolsVersion '28.0.3'}dependencies { implementation project(':react-native-firebase') implementation project(':react-native-device-info') implementation project(':react-native-gesture-handler') implementation project(':rn-splash-screen') implementation project(':react-native-vector-icons') implementation project(':react-native-picker') implementation project(':react-native-image-picker') implementation fileTree(dir: "libs", include: ["*.jar"]) implementation 'com.google.firebase:firebase-core:17.0.1' implementation "com.google.android.gms:play-services-base:17.0.0" implementation "com.google.firebase:firebase-messaging:19.0.1" implementation 'me.leolin:ShortcutBadger:1.1.22@aar' implementation "com.facebook.react:react-native:+" // From node_modules implementation 'androidx.legacy:legacy-support-v4:1.0.0'}// Run this once to be able to run the application with BUCK// puts all compile dependencies into folder libs for BUCK to usetask copyDownloadableDepsToLibs(type: Copy) { from configurations.compile into 'libs'}apply plugin: 'com.google.gms.google-services'
I have tried to follow the stack trace shown above without any success. Also I have tried to remove all getBoolean (as a test) where visible in ReadableNativeArray.java, no success. I deleted node_modules, re-install them, nothing there. One more detail, is that this error appears BEFORE checking if npm is running.
FYI, everything goes well on iOS, so i don't believe there is an issue with any package installed.