Android中ArrayAdapter适配器使用问题 15
ArrayAdapter<String>(MainActivity.this,android.R.layout.simple_dropdown_item_1line,bo...
ArrayAdapter<String>(MainActivity.this, android.R.layout.simple_dropdown_item_1line, books);
为什么不能在onCreate()方法外面实例化,报的异常是:
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.autocompletetextview/com.example.autocompletetextview.MainActivity}: java.lang.IllegalStateException: System services not available to Activities before onCreate()
我翻译过来不大理解,求大神指教
java.lang.RuntimeException的:无法实例活动ComponentInfo {
com.example.autocompletetextview / com.example.autocompletetextview.MainActivity
} : java.lang.IllegalStateException :系统之前的onCreate不向活动服务( ) 展开
为什么不能在onCreate()方法外面实例化,报的异常是:
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.autocompletetextview/com.example.autocompletetextview.MainActivity}: java.lang.IllegalStateException: System services not available to Activities before onCreate()
我翻译过来不大理解,求大神指教
java.lang.RuntimeException的:无法实例活动ComponentInfo {
com.example.autocompletetextview / com.example.autocompletetextview.MainActivity
} : java.lang.IllegalStateException :系统之前的onCreate不向活动服务( ) 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询