-
Notifications
You must be signed in to change notification settings - Fork 255
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 - Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference #53
Comments
Hi, I have the same issue. |
Couldn't find a fix yet :( |
Will look into it this weekend. Do you experience this bug when only including this module ? |
Yes, i can't run my app with it, i need to remove ReactNativeAudioStreamingPackage() from MainApplication.java and all related code in android/settings.gradle and android/app/build.gradle to run the app without react-native-audio-streaming |
In my case react-native-audio-streaming module crash the process of react-native-push-notification when i receive remote notification and the app is closed. Another words when the new remote notification arrived, the react-native-push-notification start some process in background and the react-native-audio-streaming crash this process. The logs looks this way: |
@arshavinho try to set new ReactNativeAudioStreamingPackage() into MainApplication.java |
I can't manage to reproduce the error but it seems that for some reason the currentActivity could be null in the module. I found some workaround here bourgois/react-native-hockeyapp@224a447 and in the react-native doc http://facebook.github.io/react-native/docs/native-modules-android.html#getting-activity-result-from-startactivityforresult. If someone want to take a look, or give me access to a public repo with the bug, I could look into it. |
@Arkanine i already have new ReactNativeAudioStreamingPackage(); in my MainApplication.java and in ReactNativeAudioStreamingModule.java: Maybe it's related to react-native-navigation ? For android we need to change or MainApplication.java and MainActivity: https://github.com/wix/react-native-navigation/wiki/Installation---Android
|
i modified ReactNativeAudioStreamingModule.java like:
and now the app starts, but when i try to play a sound i get:
|
I have the same bug, does anyone have a solution ? |
unfortunately no :( |
Adding |
I still have the same issue. |
Are you using code-push? Cause in my case this is what causes this bug |
@cherniv yes using codepush |
I've opened an issue: microsoft/react-native-code-push#872 , but it looks like no one can help, frustrating... |
Still an issue |
add these lines to public void showNotification() {
if(clsActivity == null) {
clsActivity = module.getClassActivity();
}
.... |
Hello guys,
i'm trying to build an app i made on iOS to Android, and i have this error at startup:
Do you have any idea?
Thanks!
"react-native-audio-streaming": "^2.2.0",
"react-native": "0.35.0",
"react": "15.3.2"
My MainApplication.java:
The text was updated successfully, but these errors were encountered: