Skip to content
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 in webview Select file image upload crash(solved) java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, dat #64

Closed
AgelessSwart opened this issue Dec 9, 2019 · 0 comments

Comments

@AgelessSwart
Copy link

java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, dat

找到node_modules/react-native-file-selector/android/src/main/java/ui/fileselector/RNFileSelectorModule.java

修改
`public void onActivityResult(Activity activity, int requestCode, int resultCode, Intent data) {

  if (requestCode == 1 && resultCode == AppCompatActivity.RESULT_OK) {
    String filePath = data.getStringExtra(FilePickerActivity.RESULT_FILE_PATH);
    if(filePath == null){
      return;
    }else{
      onDone.invoke(filePath);
    }
  } else if (requestCode == 1 && resultCode == AppCompatActivity.RESULT_CANCELED) {
    if(onCancel != null){
      onCancel.invoke();
    }
  }
}`
@AgelessSwart AgelessSwart changed the title webview 里选择文件图片上传闪退问题(已解决) java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, dat android端webview 里选择文件图片上传闪退问题(已解决) java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, dat Dec 9, 2019
@AgelessSwart AgelessSwart changed the title android端webview 里选择文件图片上传闪退问题(已解决) java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, dat android in webview Select file image upload crash(solved) java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, dat Dec 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant