Android 4.x : Error while updating property 'nativeBackgroundAndroid' of a view managed by: RCTView
See original GitHub issueI have a production app that has crashs ONLY with android 4.x devices. I’m tring to make the simplest crashing app that produces this bug on 4.x devices (and ont crashing on other devices, of course !)
I saw several thread mentioning this bug : https://github.com/react-native-community/jsc-android-buildscripts/issues/132 but they did not provide a simple “hello world” example reproducing crash, IMHO.
I could reproduce it on a new clean project :
$ react-native init testbackgroundcolor
==> react-native@0.63.2[0]
$ cd testbackgroundcolor
$ react-native start
(new terminal)
$ react-native run-android
this is my code (just modified App.js) :
import React from 'react';
import {
StyleSheet,
View,
Button,
} from 'react-native';
const App: () => React$Node = () => {
return (
<View>
<Button
title="Press me"
fontFamily="Helvetica-Bold"
onPress={() => {console.info ("Pressed");}}
/>
</View>
);
};
const styles = StyleSheet.create({
});
export default App;
Run :
- on any AVD but 4.x : a blue button will be printed.
- on a 4.x AVD, such as Android 4.4 (Google APIs) with 800x1280 : you have a crash “Error while updating property ‘nativeBackgroundAndroid’ of a view managed by: RCTView”
To avoid problem :
- I’ll remove button 😃
I don’t know what to do from here to “help”…
[0] % react-native info
info Fetching system and libraries information...
(node:13839) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
System:
OS: Linux 5.8 Arch Linux
CPU: (12) x64 Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
Memory: 245.41 MB / 15.55 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.10.1 - /usr/bin/node
Yarn: 1.22.5 - /usr/bin/yarn
npm: 6.14.7 - /usr/bin/npm
Watchman: 4.9.0 - /usr/bin/watchman
SDKs:
Android SDK:
API Levels: 10, 16, 17, 19, 20, 23, 27, 28, 29, 4, 8
Build Tools: 19.0.1, 20.0.0, 27.0.3, 28.0.3, 29.0.2
System Images: android-17 | ARM EABI v7a, android-17 | MIPS, android-17 | Intel x86 Atom, android-19 | Intel x86 Atom, android-19 | Google APIs Intel x86 Atom, android-23 | Android TV ARM EABI v7a, android-23 | Android TV Intel x86 Atom, android-25 | Google APIs Intel x86 Atom, android-27 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-30 | Google Play Intel x86 Atom, android-L | Android TV ARM EABI v7a, android-L | Android TV Intel x86 Atom, android-L | ARM EABI v7a, android-L | Intel x86 Atom, android-L | Intel x86 Atom_64, android-R | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: Not Found
Languages:
Java: 1.8.0_265 - /usr/bin/javac
Python: 3.8.5 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.63.2 => 0.63.2
npmGlobalPackages:
*react-native*: Not Found
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:14
Top Results From Across the Web
Error while updating property 'nativeBackgroundAndroid' of a ...
JSApplicationIllegalArgumentException : Error while updating property 'nativeBackgroundAndroid' of a view managed by: RCTView at ...
Read more >Error while updating property 'nativeBackgroundAndroid' of a ...
It's because nativeBackgroundAndroid isn't a valid property within the view. I was able to recreate it by <View style={styles.
Read more >Error On An Android Studio Project While Updating Property:
Error while updating property 'nativeBackgroundAndroid' of a view managed by: RCTView. I have a production app that has crashs ONLY with android 4.x....
Read more >Error while updating property 'nativeBackgroundAndroid' of a ...
Coding example for the question Error while updating property 'nativeBackgroundAndroid' of a view managed by: RCTView-Reactjs.
Read more >Troubleshooting common React Native bugs - LogRocket Blog
React Native is a great framework to implement your app for both Android and iOS platforms. But while it's widely supported by the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jesenko yes. We are releasing the Android 4.x deprecation with 63.4/64.0. It will no longer be supported & changes won’t be merged into master
@safaiyeh If I understand correctly, this bug thus also won’t be fixed in 0.63.x? If so, I guess min API for 0.63.x should already be bumped to 21, and release notes updated - so that those that need Android 4.x support would stay at 0.62.x release…