Error: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type ReadableArray?
See original GitHub issueI’ve created a new React-Native project (0.59-RC3) and installed the newest WatermelonDB. iOS is working fine but Android won’t compile. I’m getting those errors:
e: SomeRandomFilePath/node_modules/@nozbe/watermelondb/native/android/src/main/java/com/nozbe/watermelondb/DatabaseBridge.kt: (196, 37): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type ReadableArray?
e: SomeRandomFilePath/node_modules/@nozbe/watermelondb/native/android/src/main/java/com/nozbe/watermelondb/DatabaseBridge.kt: (200, 50): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type ReadableArray?
e: SomeRandomFilePath/node_modules/@nozbe/watermelondb/native/android/src/main/java/com/nozbe/watermelondb/DatabaseBridge.kt: (201, 50): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type ReadableArray?
e: SomeRandomFilePath/node_modules/@nozbe/watermelondb/native/android/src/main/java/com/nozbe/watermelondb/DatabaseBridge.kt: (202, 49): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type ReadableArray?
e: SomeRandomFilePath/node_modules/@nozbe/watermelondb/native/android/src/main/java/com/nozbe/watermelondb/DatabaseBridge.kt: (202, 61): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type ReadableArray?
e: SomeRandomFilePath/node_modules/@nozbe/watermelondb/native/android/src/main/java/com/nozbe/watermelondb/DatabaseBridge.kt: (206, 50): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type ReadableArray?
e: SomeRandomFilePath/node_modules/@nozbe/watermelondb/native/android/src/main/java/com/nozbe/watermelondb/DatabaseBridge.kt: (207, 47): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type ReadableArray?
e: SomeRandomFilePath/node_modules/@nozbe/watermelondb/native/android/src/main/java/com/nozbe/watermelondb/DatabaseBridge.kt: (208, 50): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type ReadableArray?
e: SomeRandomFilePath/node_modules/@nozbe/watermelondb/native/android/src/main/java/com/nozbe/watermelondb/DatabaseBridge.kt: (209, 49): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type ReadableArray?
e: SomeRandomFilePath/node_modules/@nozbe/watermelondb/native/android/src/main/java/com/nozbe/watermelondb/DatabaseBridge.kt: (209, 61): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type ReadableArray?
e: SomeRandomFilePath/node_modules/@nozbe/watermelondb/native/android/src/main/java/com/nozbe/watermelondb/DatabaseBridge.kt: (213, 50): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type ReadableArray?
e: SomeRandomFilePath/node_modules/@nozbe/watermelondb/native/android/src/main/java/com/nozbe/watermelondb/DatabaseBridge.kt: (214, 47): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type ReadableArray?
e: SomeRandomFilePath/node_modules/@nozbe/watermelondb/native/android/src/main/java/com/nozbe/watermelondb/DatabaseBridge.kt: (218, 50): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type ReadableArray?
e: SomeRandomFilePath/node_modules/@nozbe/watermelondb/native/android/src/main/java/com/nozbe/watermelondb/DatabaseBridge.kt: (219, 47): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type ReadableArray?
I could add some more information, but don’t know which one you want, please let me know.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Only safe or non null assserted calls are allowed on a nullable ...
The problem is, that you defined the ArrayList as nullable . You have two options here: don't define the variable nullable (this depends...
Read more >Safe calls(?.) vs Null checks(!!) in Kotlin - Suneet Agrawal
In Kotlin, the type system distinguishes between references that can hold null (nullable references) and those that can not (non-null references).
Read more >"Only safe or null-asserted calls are allowed on nullable ...
"Only safe or null-asserted calls are allowed on nullable receiver" after converting Java code with Map#get as receciver that would throw an exception...
Read more >Only safe (?.) or non-null asserted (!!.) calls are allowed on a ...
It would appear that AuthResult? is a nullable type (returned from it.result / it.getResult() ) which is a fundamental concept of Kotlin. That...
Read more >Kotlin and null safety: Yet Again! | by Vinay Joglekar - Medium
or non-null asserted (!!.) calls are allowed on a nullable receiver of type User? user?.name = "Vinay". This is how you null- check...
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

Yup, its braking change in
0.59: https://github.com/facebook/react-native/commit/b640b6f I will create PR later this week with fix for this. @vdlindenmark thanks for reporting!@rozPierog Nice! The app now build 😃 So I could start to change all Realm code to WatermelonDB 😃