React-native-share: MainApplication is not abstract and does not override abstract method getFileProviderAuthority() in ShareApplication

Created on 12 Nov 2018  路  4Comments  路  Source: react-native-share/react-native-share

Actual behaviour

Task :app:compileDebugJavaWithJavac FAILED
...

MainApplication is not abstract and does not override abstract method getFileProviderAuthority() in ShareApplication
public class MainApplication extends Application implements ReactApplication, ShareApplication {
^

Environment

  • react-native 0.56.0
  • Android platform

react-native-share

version: 1.1.3

first seen issue

Most helpful comment

Thanks, i put this code on wrong place:

I did this as well and it took me a while to cipher it out. In my case I added it to the private final ReactNativeHost ... where all the other @Overrides were located. This override needs to be at the public class level.

All 4 comments

did you add this:

@Override
     public String getFileProviderAuthority() {
            return "com.example.yourappidhere.provider";
     }

?

its possible that this error is caused because of some other libraries. i have seen this error before. @vadhack did you link properly? when did you get this error. at the time of building release or development?

Thanks, i put this code on wrong place:

public String getFileProviderAuthority() {
return "com.example.yourappidhere.provider";
}

Sorry :( is not a issue

Thanks, i put this code on wrong place:

I did this as well and it took me a while to cipher it out. In my case I added it to the private final ReactNativeHost ... where all the other @Overrides were located. This override needs to be at the public class level.

Was this page helpful?
0 / 5 - 0 ratings