안드로이드 개발 질문/답변
(글 수 45,052)
안녕하세요.
아래와 같이 ListView에 setAdapter를 지정했는데, 에러가 나고 있습니다.
어디가 문제일까요?
_lvProviders = (ListView)findViewById(R.id.lvProvider);
_lvLocations = (ListView)findViewById(R.id.lvLocation);
_GPS = new CGPS((LocationManager)getSystemService(LOCATION_SERVICE));
_aaProviders =
new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1 ,_GPS.getProviders());
_aaLocations =
new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1 ,_GPS.getLocations());
_lvProviders.setAdapter(_aaProviders); -> 이부분에서 에러남.
_lvLocations.setAdapter(_aaLocations); -> 이부분에서 에러남.
[ Stack ]
DalvikVM[localhost:8620]
Thread [<1> main] (Suspended)
ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord, Intent) line: 2661
ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord, Intent) line: 2679
ActivityThread.access$2300(ActivityThread, ActivityThread$ActivityRecord, Intent) line: 125
ActivityThread$H.handleMessage(Message) line: 2033
ActivityThread$H(Handler).dispatchMessage(Message) line: 99
Looper.loop() line: 123
ActivityThread.main(String[]) line: 4627
Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 521
ZygoteInit$MethodAndArgsCaller.run() line: 868
ZygoteInit.main(String[]) line: 626
NativeStart.main(String[]) line: not available [native method]
Thread [<6> Binder Thread #2] (Running)
Thread [<5> Binder Thread #1] (Running)



