[Android]单元测试WritableNativeMap时出现UnsatisfiedLinkError

官方做法是引入一个 PowerMockito

参考:
https://stackoverflow.com/questions/35275772/unsatisfiedlinkerror-when-unit-testing-writablenativemap

更简单的做法是直接使用 JavaOnlyMapJavaOnlyArray 代替 Arguments.createMap()

Arguments.createArray()

https://github.com/facebook/react-native/tree/main/ReactAndroid/src/main/java/com/facebook/react/bridge

你可能感兴趣的:([Android]单元测试WritableNativeMap时出现UnsatisfiedLinkError)