I have one class in a file named WeatherContract.java which has a static inner class, as follows:
public class WeatherContract {
...
...
public static final class WeatherEntry implements BaseColumns {
...
...
}
}
Now I am trying to call the inner class in another file called TestWeatherContract.java as follows
...
import com.example.android.sunshine.app.data.WeatherContract;
...
public class TestWeatherContract extends AndroidTestCase {
...
public void testBuildWeatherLocation() {
Uri locationUri = WeatherContract.WeatherEntry.buildWeatherLocation(TEST_WEATHER_LOCATION);
...
Now in the following line, the word "WeatherEntry" is marked in red and when I hover on the word I get the following error "Cannot resolve symbol 'WeatherEntry'.
Uri locationUri = WeatherContract.WeatherEntry.buildWeatherLocation(TEST_WEATHER_LOCATION);
Please note that I am not getting any error in the import statement, so I'm assuming that there are no errors in stating the path of the class.
Also, I have another file called FetchWeatherTask.java. I have the following import statement at the beginning of the file:
import com.example.android.sunshine.app.data.WeatherContract.WeatherEntry;
In this case, in the import statement again the word "WeatherEntry" is marked in red and I get the error "Cannot resolve symbol 'WeatherEntry'".
Please help. I'm on Android Studio 1.5. I have posted this question earlier, but it was put on hold because I provided incomplete details. So I am posting it again with all details. I'm sorry if I have violated the rules of the community, I am new here. Thank you.