# RequiresDevice

Artifact: [androidx.test:runner](https://developer.android.com/jetpack/androidx/releases/test) [View Source](https://cs.android.com/search?q=file:androidx/test/filters/RequiresDevice.java+class:androidx.test.filters.RequiresDevice)

*** ** * ** ***


```
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = [ElementType.TYPE, ElementType.METHOD])
public annotation RequiresDevice
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This annotation is deprecated.**   
>
> This annotation should provide limited benefit. Use a more specific filtering mechanism to tie tests to a specific environment if needed.

Indicates that a specific test should not be run on emulator.

The test will be skipped if its executed on one of the recognized Android emulator types (currently ones with Build.HARDWARE equal to 'goldfish', 'ranchu' and 'gce_x86')