getPackages RNHOckeyAppPackage(this) in MainApplication instead of MainActivity
pashute opened this issue · 1 comments
pashute commented
In react-native 0.55.3 the List<ReactPackage> getPackages() {
is in MainApplication.java
and not in MainActivity.java
.
When I try to add the new RNHockeyAppPackage(this)
in the existing getPackages()
list, I get: error: incompatible types: <anonymous ReactNativeHost> cannot be converted to Application
If I try with (this.Application)
or (this.getApplication)
I get symbol not found
If I try just new RNHOckeyAppPackage()
I get: constructor RNHockeyAppPackage in class RNHockeyAppPackage cannot be applied to given types;
pashute commented
solved: according to rest of documentation for older versions I used the static MainApplication.this.
, (new RNHockeyAppPackage(MainApplication.this));