Closed mk-nickyang closed 5 years ago
@RBogie any chance you could have a look at this some time next week? I noticed we are also getting similar crash reports for our own app (Hoy).
I've tried a few things, but I can't really figure out how to properly solve this problem. Need to brush up on my Java...
Thanks!
Same error here, that is, the one in red, on Android only.
Attempt to read from field 'java.lang.String android.content.Intent.mAction' on a null object reference
The error seems to occur in node_modules/react-native-email-link/android/src/main/java/com/facebook/react/modules/email/EmailModule.java
at line 34:
Intent emailIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("mailto:"));
My environment:
buildToolsVersion = "27.0.3"
minSdkVersion = 16
compileSdkVersion = 27
targetSdkVersion = 26
supportLibVersion = "27.0.3"
"react": "16.6.0-alpha.8af6728",
"react-native": "0.57.3",
"react-native-email-link": "^1.2.3",
Yeah, we've got this issue too. Its however not an issue on the line state @jorisw but a bit lower. Android on lower SDKs has an com.android.fallback
package which has no default intent, causing the null pointer exception.
I've written an fix for this. @tschoffelen can you integrate it? https://github.com/leanmotherfuckers/react-native-email-link/pull/24
Thanks @johnnyborg, that's great! I've incorporated your fix into the latest NPM release (react-native-email-link@1.4.0
).
Awesome, @tschoffelen . Bedankt ;-)!
Hi, this library works perfectly on most Android devices, but when I tested it on a Galaxy S6 with Android 5, it crashed. Here's the stack trace I got
I also experienced the similar crashes when I test it on some Android Emulators with Android 7 (API version 25) or earlier
My code:
My environment: