When developing React – Native, there are always a lot of weird problems, so write them down.
MeasureInWindow invalid?
If measureInWindow is used in javascript, all values are 0 or undefined? But this View does have a place in the code. At this point you should see if the View has any special styles set. Officially, only a View with a native style can obtain its position and width on Android, since it is ideal to set opacity:1 on the View.
Bug with Surfaceview in Flex when customizing components
With the Surfaceview provided by native Android as a child component, using flex layouts can cause display issues. The ideal solution is to cover the outer LinearLayout, and the inner Surfaceview needs to follow the size changes of the parent layer.
Index. Android. Can’t find the bundle
I had a really weird bug. At the time of development, there was no problem at all, but when the APK was packaged and installed, it showed that index.android.bundle was not found. In some cases, the APK cannot be packaged directly because index.android.bundle cannot be generated. Gradle has been upgraded in android/build.gradle. And that’s what caused the bug. I’ll just substitute it back.
Dependencies {/ / the classpath (" com. Android. View the build: gradle: 4.0.1 ") of the original classpath (" com. Android. View the build: gradle: 4.1.2 ") }Copy the code