[Android-Tips] findviewbyid function returns null

*)if you run the android app, and it displays an exception, then you find the resource returned by findviewbyid is null,

most likely you are using the old style "id" in you xml layout file, change it to "android.id" will fix your problem.

 

*)if there is a compile error related to R.id.**, please build your project manually to refresh the R file.

if you perform a clean and build, eclipse may indicate you to fix project build path error, yet you just need to remove the R file and recreate it by building the project once again. 

你可能感兴趣的:([Android-Tips] findviewbyid function returns null)