在范围内无法访问类型为Tokenizing的封闭实例

时间:2014-01-05 18:41:42

标签: android eclipse android-intent

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    Intent intent = new Intent(Tokenizing.this, ReadText.class);
    switch (requestCode) {
        case REQUEST_CODE:
            // If the file selection was successful
            if (resultCode == RESULT_OK) {
                if (data != null) {
                    // Get the URI of the selected file
                    final Uri uri = data.getData();
                    Log.i(TAG, "Uri = " + uri.toString());
                    try {
                        // Get the file path from the URI
                        final String path = FileUtils.getPath(this, uri);
                        Toast.makeText(this,
                                "File Selected: " + path, Toast.LENGTH_LONG).show();
                        intent.putExtra("path", path);
                        startActivity(intent);

                    } catch (Exception e) {
                        Log.e("FileSelectorTestActivity", "File select error", e);
                    }
                }
            }

我想将参数发送到2类(Tokenizing和ReadText) 但我得到这个错误“在范围内无法访问类型Tokenizing的封闭实例” 有人可以帮帮我吗?

0 个答案:

没有答案