Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Fatal Exception: java.lang.IncompatibleClassChangeError Couldn't find com.facebook.react.uimanager.a.a.a #20916

Closed
2 of 3 tasks
Jekiwijaya opened this issue Aug 30, 2018 · 4 comments
Labels
Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.

Comments

@Jekiwijaya
Copy link
Contributor

Jekiwijaya commented Aug 30, 2018

Environment

Run react-native info in your terminal and paste its contents here.

Environment:
  OS: macOS 10.14
  Node: 8.11.3
  Yarn: 1.6.0
  npm: 5.6.0
  Watchman: 4.7.0
  Xcode: Xcode 10.0 Build version 10L201y
  Android Studio: Not Found

Packages: (wanted => installed)
  react: 16.4.1 => 16.4.1
  react-native: 0.55.4 => 0.55.4

Description

My workspace got an error after we upgrade from react-native 0.54 to 0.55, the error come in Crashlytics.

Fatal Exception: java.lang.IncompatibleClassChangeError: Couldn't find com.facebook.react.uimanager.a.a.a
       at libcore.reflect.AnnotationAccess.toAnnotationInstance(AnnotationAccess.java:659)
       at libcore.reflect.AnnotationAccess.toAnnotationInstance(AnnotationAccess.java:641)
       at libcore.reflect.AnnotationAccess.getDeclaredAnnotation(AnnotationAccess.java:170)
       at java.lang.reflect.Method.getAnnotation(Method.java:301)
       at com.facebook.react.uimanager.ViewManagersPropertyCache.extractPropSettersFromViewManagerClassDefinition(ViewManagersPropertyCache.java:429)
       at com.facebook.react.uimanager.ViewManagersPropertyCache.getNativePropSettersForViewManagerClass(ViewManagersPropertyCache.java:320)
       at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.(ViewManagerPropertyUpdater.java:122)
       at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.(ViewManagerPropertyUpdater.java:116)
       at com.facebook.react.uimanager.ViewManagerPropertyUpdater.findManagerSetter(ViewManagerPropertyUpdater.java:79)
       at com.facebook.react.uimanager.ViewManagerPropertyUpdater.getNativeProps(ViewManagerPropertyUpdater.java:66)
       at com.facebook.react.uimanager.ViewManager.getNativeProps(ViewManager.java:203)
       at com.facebook.react.uimanager.UIManagerModuleConstantsHelper.createConstantsForViewManager(UIManagerModuleConstantsHelper.java:145)
       at com.facebook.react.uimanager.UIManagerModuleConstantsHelper.createConstants(UIManagerModuleConstantsHelper.java:92)
       at com.facebook.react.uimanager.UIManagerModule.createConstants(UIManagerModule.java:225)
       at com.facebook.react.uimanager.UIManagerModule.(UIManagerModule.java:149)
       at com.facebook.react.CoreModulesPackage.createUIManager(CoreModulesPackage.java:173)
       at com.facebook.react.CoreModulesPackage.access$000(CoreModulesPackage.java:53)
       at com.facebook.react.CoreModulesPackage$7.get(CoreModulesPackage.java:130)
       at com.facebook.react.CoreModulesPackage$7.get(CoreModulesPackage.java:127)
       at com.facebook.react.LazyReactPackage.createNativeModules(LazyReactPackage.java:79)
       at com.facebook.react.NativeModuleRegistryBuilder.processPackage(NativeModuleRegistryBuilder.java:106)
       at com.facebook.react.ReactInstanceManager.processPackage(ReactInstanceManager.java:1172)
       at com.facebook.react.ReactInstanceManager.processPackages(ReactInstanceManager.java:1142)
       at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1080)
       at com.facebook.react.ReactInstanceManager.access$000(ReactInstanceManager.java:113)
       at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:911)
       at java.lang.Thread.run(Thread.java:818)
--

I saw the issue is look's like #9354. But that issue related to gson, and mine is uimanager from react.

  • Samsung device 5.0, 5.0.1, 5.0.2.
    After I search, I still didn't find the solution. It's been affect lot of users.

Please share if someone know the solution

@dulmandakh
Copy link
Contributor

did you enabled proguard?

@react-native-bot react-native-bot added the Platform: Android Android applications. label Aug 30, 2018
@react-native-bot
Copy link
Collaborator

It looks like you are using an older version of React Native. Please update to the latest release, v0.56 and verify if the issue still exists.

The ":rewind:Old Version" label will be removed automatically once you edit your original post with the results of running react-native info on a project using the latest release.

@Jekiwijaya
Copy link
Contributor Author

Jekiwijaya commented Aug 30, 2018

@dulmandakh yes I am.

I already have this rule

-keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
-keep class * extends com.facebook.react.bridge.NativeModule { *; }
-keep class com.facebook.react.uimanager.UIProp{*;}
-keep class com.facebook.react.ReactInstanceManagerImpl{*;}
-keep class com.facebook.react.XReactInstanceManagerImpl{*;}
-keepclassmembers,includedescriptorclasses class * { native <methods>; }
-keepclassmembers class *  { @com.facebook.react.uimanager.UIProp <fields>; }
-keepclassmembers class *  { @com.facebook.react.uimanager.annotations.ReactProp <methods>; }
-keepclassmembers class *  { @com.facebook.react.uimanager.annotations.ReactPropGroup <methods>; }
-dontwarn com.facebook.react.**

@dulmandakh
Copy link
Contributor

Proguard rules are used and tested since 0.56 release, please upgrade to 0.56 or 0.57, which will be released very soon.

@facebook facebook locked as resolved and limited conversation to collaborators Aug 30, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Aug 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants