reactnativecn / react-native-qq

308 stars 87 forks source link

QQModule is not abstract and does not override abstract method onActivityResult(int,int,Intent) in ActivityEventListener #66

Closed mantou132 closed 7 years ago

mantou132 commented 7 years ago

编译时报错:

/***/node_modules/react-native-qq/android/src/main/java/cn/reactnative/modules/qq/QQModule.java:34: error: QQModule is not abstract and does not override abstract method onActivityResult(int,int,Intent) in ActivityEventListener
public class QQModule extends ReactContextBaseJavaModule implements IUiListener, ActivityEventListener {
       ^
Note: /***/node_modules/react-native-qq/android/src/main/java/cn/reactnative/modules/qq/QQModule.java uses or overrides a deprecated API.

依赖:

"react": "16.0.0-alpha.12",
        "react-native": "https://github.com/mantou132/react-native.git#0.46-webview-file-input",
        "react-native-full-screen": "https://github.com/mantou132/react-native-full-screen.git",
        "react-native-qq": "^2.0.5",
        "react-native-share-actions": "^0.1.0",
        "react-native-wechat": "^1.9.9"
mantou132 commented 7 years ago

解决了:


    public void onActivityResult(Activity activity, int requestCode, int resultCode, Intent data) {
        Tencent.onActivityResultData(requestCode, resultCode, data, this);
}

改成:

    public void onActivityResult(Activity activity, int requestCode, int resultCode, Intent data) {
        Tencent.onActivityResultData(requestCode, resultCode, data, this);
}

    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        Tencent.onActivityResultData(requestCode, resultCode, data, this);
}