Reputation: 14711
Im trying to write some automated test cases for Android I created a Java project with JUnit 4 and uiautomator.jar + android.jar
but on the line:
UiObject settingsApp = appViews.getChildByText(new UiSelector().className(android.widget.TextView.class.getName()), "Settings");
I get a red underline saying
android.widget cannot be resolved to a type
I tried to add
import com.android.widget.*;
but I get this
The import com.android.widget cannot be resolved
So which jar file should I add to the build path to make this import work?
Upvotes: 0
Views: 100
Reputation: 20626
You need to import android.widget.*
, and not com.android.widget.*
.
You could also try try cleaning the project, or Ctrl + Shitf + O to organize imports.
Upvotes: 1