开发者

How to access button's id in android 1.5?

开发者 https://www.devze.com 2022-12-24 19:01 出处:网络
Mostly i am working on android 1.6. I mad开发者_如何学JAVAe an application on 1.5 platform but i could not access button through like R.id.button1 like platform 1.6. Is there any idea?

Mostly i am working on android 1.6. I mad开发者_如何学JAVAe an application on 1.5 platform but i could not access button through like R.id.button1 like platform 1.6. Is there any idea?


  1. Are you sure .R file has been auto generated? If not, do a Project->Clean->Rebuild in Eclipse and see if it changes anything.

  2. Have you imported the correct Resource file? Sometimes people import android.R and so cannot see their Ids.


Import

import com.your.package.R;
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号