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

kotlin项目使用crash #1246

Closed
luyz opened this issue Feb 27, 2020 · 0 comments
Closed

kotlin项目使用crash #1246

luyz opened this issue Feb 27, 2020 · 0 comments

Comments

@luyz
Copy link

luyz commented Feb 27, 2020

在PictureBaseActivity中,把函数
@OverRide
protected void onCreate(Bundle savedInstanceState) {

//super.onCreate(savedInstanceState);把这行代码替换成下方的判断,原因是kotlin中savedInstanceState这个变量是null,但是kotlin中onCreate需要传不为空的变量

  if (savedInstanceState != null) {
        super.onCreate(savedInstanceState);
    }else{
        super.onCreate(new Bundle());
    }

}

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

2 participants