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

开启“不保留活动”,还是会报异常 #12

Open
okadaNana opened this issue Oct 11, 2016 · 0 comments
Open

开启“不保留活动”,还是会报异常 #12

okadaNana opened this issue Oct 11, 2016 · 0 comments

Comments

@okadaNana
Copy link

在华为 C8816,android 4.3 上,会报空指针异常。

经过断点调试,发现是 mCapturePhotoHelper 为 null

@Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        Log.i(TAG, "requestCode: " + requestCode + " resultCode: " + resultCode + " data: " + data);
        if (requestCode == CapturePhotoHelper.CAPTURE_PHOTO_REQUEST_CODE) {
            File photoFile = mCapturePhotoHelper.getPhoto();
            // 代码省略
}

是不是因为 mCapturePhotoHelper 被回收了啊?

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