我正在尝试将 Dropbox 选择器插件 api 集成到我的应用程序中。我遇到了一个异常问题。在我的应用程序中,当我启动 dbx 选择器时,只要我选择一个文件,应用程序就会失败并显示以下错误代码:
抱歉,发生错误了。请稍后再试。
这是我实现 Dropbox API 的代码部分。这部分代码是最初调用 Dropbox api 的地方。
public void StartDropboxApplication() {
    // create the chooser
    DbxChooser chooser = new DbxChooser(APP_KEY);
    DbxChooser.ResultType result;
    // determine which mode to be in // TODO REMOVE ALL BUT FILE CONTENT TODO SIMPLIFY by making this a setting
    switch(( (RadioGroup) ParentActivity.findViewById(R.id.link_type)).getCheckedRadioButtonId() ) {
        case R.id.link_type_content:
            result = DbxChooser.ResultType.DIRECT_LINK;
            break;
        default:
            throw new RuntimeException("Radio Group Related error.");
        }
        // launch the new activity
        chooser.forResultType(result).launch(ParentActivity, 0);
    }
这是代码应该拾取它的位置,尽管它永远不会。
protected void onActivityResult( int request, int result, Intent data ) {
    Log.i(fileName, "result: " + result);
    // check to see if the camera took a picture
    if (request == 1) {
        // check to see if the picture was successfully taken
        if (result == Activity.RESULT_OK) {
            onPicture();
        } else {
            Log.i(fileName, "Camera App cancelled.");
        }
    } else if (request == 0) {
        if ( result == Activity.RESULT_OK ) {
            onDropbox(data);
        } else {
            Log.i(fileName, "dropbox related issue.");
        }
    }
}
感谢您提供的任何帮助或建议。