java - Arrayadapter issue in android studio (android.R.layout.something did not work) -


i follow tutorial online , want write following line of code

arrayadapter adapter=new arrayadapter(this,android.r.layout.select_dialog_item,countries); 

however, android.r.layout.select_dialog_item cannot recognized android studio, how can fix this? should import packages?

here, reference built-in xml layout document part of android os, rather 1 of own xml layouts.

there many more layout check documentation of layout

the layouts in sdk installation

path (according system sdk path or path have set while downloading sdk) :

c:\program files\android\android-sdk\platforms\android-21\data\res\layout 

android.r.layout.select_dialog_item cannot recognized android studio, how can fix this?

you may need change refresh or try changing location of android-sdk

should import packages?

no, need check whether layout files there in above path of android-sdk if they(layout) in path of sdk refresh(restart) android studio.

hope helps.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -