React-native-navigation: [V2] [Android] cannot find symbol import com.facebook.react.uimanager.MeasureSpecProvider

Created on 7 Jun 2018  路  7Comments  路  Source: wix/react-native-navigation

Issue Description

Since 4c8d48b1b596c314ff3242a2b619c3f893d4b5e1 Android builds fail on ReactNative >= 0.55.4 as both MeasureSpecProvider and SizeMonitoringFrameLayout moved to uimanager/common https://github.com/facebook/react-native/commit/6b45fb2cb1ca44fa7375bc7696bf90a68a85df3c

Steps to Reproduce / Code Snippets / Screenshots

react-native run-android

error: cannot find symbol import com.facebook.react.uimanager.MeasureSpecProvider
error: cannot find symbol import com.facebook.react.uimanager.SizeMonitoringFrameLayout

Temp patch

lib/android/app/src/main/java/com/reactnativenavigation/react/SyncUiImplementation.java

- import com.facebook.react.uimanager.MeasureSpecProvider;
+ import com.facebook.react.uimanager.common.MeasureSpecProvider;

- import com.facebook.react.uimanager.SizeMonitoringFrameLayout;
+ import com.facebook.react.uimanager.common.SizeMonitoringFrameLayout;

No idea how to properly fix this, my Java skills are pretty much non-existent ;-)


Environment

  • React Native Navigation version: 2.0.2329
  • React Native version: >= 0.55.4
  • Platform(s) (iOS, Android, or both?): Android
Android acceptebug v2

Most helpful comment

Add variantFilter fix this issue for me: https://github.com/wix/react-native-navigation/issues/3388#issuecomment-399071604

The problem is that with ./gradlew assembleRelease all RNN lib flavors (reactNative51, reactNative55) are build no matter that we have missingDimensionStrategy defined.

All 7 comments

Possibly related to #2892

I got the same problem with React Native Navigation 2.0.2330 version

Same problem with RN 55.4 and RNN 2.0.2333 version.

Still getting this error when trying to build a Release apk, using ./gradlew assembleRelease. It has no issues with react-native run-android --variant=release.

I am using RNN 2.0.2377 with react-native 0.55.4.

Add variantFilter fix this issue for me: https://github.com/wix/react-native-navigation/issues/3388#issuecomment-399071604

The problem is that with ./gradlew assembleRelease all RNN lib flavors (reactNative51, reactNative55) are build no matter that we have missingDimensionStrategy defined.

@sytolk Thanks, this works!

@sytolk thanks! wonderful

Was this page helpful?
0 / 5 - 0 ratings