square / assertj-android

A set of AssertJ helpers geared toward testing Android.
https://square.github.io/assertj-android/
Apache License 2.0
1.58k stars 156 forks source link

error: cannot access TaskStackBuilder #147

Closed AshwinNBhanushali closed 9 years ago

AshwinNBhanushali commented 9 years ago

I am getting compilation error while using the lib below is the error

E:\Sync\app\src\androidTest\java\kamlesh\sync\activities\DashboardTest.java:31: error: cannot access TaskStackBuilder assertThat(activity.spinner).isGone(); ^ class file for android.app.TaskStackBuilder not found

I am using Android Studio 1.0.2. Here is the screenshot screenshot 3

JakeWharton commented 9 years ago

What version of Android are you compiling with?

AshwinNBhanushali commented 9 years ago

I am compiling with version 4.2(Jellybean)

JakeWharton commented 9 years ago

Because of the nature of this project, you need to compile with the latest version of the platform SDK. You can still have minimum and target API levels which are older and lint will protect you from calling too-new methods.