且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

findViewById()可能会产生NullPointerException

更新时间:2023-11-19 12:21:52

这是一个已知的问题e在android.support.v7.app.AppCompatActivity中已在v24中修复。

This is a known issue in android.support.v7.app.AppCompatActivity and it has been fixed in v24.

https://code.google.com/p/android/issues/detail?id=203345

android.support.v4.app.FragmentActivity或android.app.Activity

You won't have any issues with android.support.v4.app.FragmentActivity or android.app.Activity