[🐛] Incompatible types: ReadableMap cannot be converted to WritableMap
See original GitHub issueInstall library, compile with android studio, receive error from Android Studio on the file Utils.java:
error: incompatible types: ReadableMap cannot be converted to WritableMap assets.pushMap(getImageResponseMap(uri, options, context));
WORKAROUND
If you follow the suggestion made by android studio you can cast the method as “(WritableMAp)”
assets.pushMap((WritableMap) getImageResponseMap(uri, options, context));
and
assets.pushMap((WritableMap) getVideoResponseMap(uri, context));
- Image Picker version: 4.0.3
- React Native version: 0.60.6
- Platform: Android
- Development Operating System: Mas OS Big Sur (Intel)
- Dev tools: Android Studio: 4.2.1, Compile SDK: 29, Gradle: 6.2, Android Gradle Plugin Version 3.5.3
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:11
Top Results From Across the Web
error: incompatible types: Task cannot be converted to Uri
You are getting the following error: incompatible types: Task cannot be converted to Uri. Because ref.getDownloadUrl() return a Task object ...
Read more >Sealed Class In Kotlin Incompatible Types Error - ADocLib
.error: incompatible types: ReadableMap cannot be converted to WritableMap map.putMapplaybackOptions Convert.toMapplayerState. Introduce a normal compiler issue ...
Read more >Example usage for com.facebook.react.bridge ReadableMap ...
getMap(key)); break; case Array: result = toList(readableMap.getArray(key)); break; default: AdjustFactory.getLogger().error("Could not convert object with ...
Read more >react-native-image-picker - Bountysource
Bug. When press the shoot button as soon as the camera opens, ... reason: '*** -[__NSDictionaryM setObject:forKey:]: object cannot be nil (key: data)' ......
Read more >how to fix : android error: incompatible types ... - YouTube
how to fix : android error : incompatible types : anonymous Callback cannot be converted to Context.
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
Almost 1 year & haven’t fixed this?
I change the return of getImageResponseMap and getVideoResponseMap for WritableMap in node_modules/react-native-image-picker/android/src/main/java/com/imagepicker/Utils.java and fixed for now.