nikhilbhr
nikhilbhr

Reputation: 101

why I cant see my layout file in eclipse

I have created a class which extends ArrayAdapter class. But while doint View v = inflater.inflate(R.layout.xxxx,..) I cannot see my layout file. I dont know what does that mean. In other activity I can see it very well using R.layout.xxx.!

Upvotes: 2

Views: 113

Answers (1)

Prashant Patel
Prashant Patel

Reputation: 238

There is a simple solution for this issue.

Suppose your package name is

com.xyz.package

Now If you will look at the top of your code you would find

import android.R;

replace this with

import com.xyz.package.R;

after replacing above import if you find still error that means your layout.xml file in res directory has errors. rectify it, clean and build it in eclipse.

Upvotes: 5

Related Questions