i have updated latest android studio (2.3.1) , when run app, doesn't work - supposed see listview text within, see blank white screen.
i working on udacity introduction android programming, not know much. if helps, @ beginning of lesson-3.
logcat shows this: 28860-28860 w: failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,div,-atomic_ldrd_strd --runtime-arg -xrelocate --boot-image=/system/framework/boot.art --runtime-arg -xms64m --runtime-arg -xmx512m --compiler-filter=speed --instruction-set-variant=cortex-a7 --instruction-set-features=default --dex-file=/data/app/com.example.android.sunshine.app-2/split_lib_slice_9_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.example.android.sunshine.app-2@split_lib_slice_9_apk.apk@classes.dex) because non-0 exit status
update--------
through debugging, might have narrowed down issue within following code in mainactivity:
@override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); if (savedinstancestate == null) { getsupportfragmentmanager().begintransaction() .add(r.id.container, new forecastfragment()) .commit(); } }
the getsupportfragmentmanager method not recognised , shows red. had change import statements pieces of code work.
it because haven't assigned id listview.
add id this..
<listview android:id="@+id/listview" android:layout_width="match_parent" android:layout_height="wrap_content" > </listview>
if doesnt work try clean building broject clicking build > clean project
Comments
Post a Comment