Skip navigation links
  • Robolectric 4.15.1 | 
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Index
  • Help

Deprecated API

Contents

  • Methods
  • Enum Constants
  • Annotation Type Elements
  • Deprecated Methods
    Method
    Description
    org.robolectric.annotation.Config.assetDir()
    If you are using at least Android Studio 3.0 alpha 5 or Bazel's android_local_test please migrate to the preferred way to configure
    org.robolectric.annotation.Config.Builder.setAssetDir(String)
    Configure asset directory via your build system; see Build System Integration
    org.robolectric.annotation.Config.Builder.setLibraries(String...)
    Configure libraries via your build system; see Build System Integration
    org.robolectric.annotation.Config.Builder.setPackageName(String)
    Configure package name via your build system; see Build System Integration
    org.robolectric.annotation.Config.Builder.setResourceDir(String)
    Configure resource directory via your build system; see Build System Integration
    org.robolectric.annotation.Config.libraries()
    If you are using at least Android Studio 3.0 alpha 5 or Bazel's android_local_test please migrate to the preferred way to configure
    org.robolectric.annotation.Config.manifest()
    If you are using at least Android Studio 3.0 alpha 5 or Bazel's android_local_test please migrate to the preferred way to configure builds http://robolectric.org/getting-started/
    org.robolectric.annotation.Config.packageName()
    To change your package name please override the applicationId in your build system. Changing package name here is broken as the package name will no longer match the package name encoded in the arsc resources file. If you are looking to simulate another application you can create another applications Context using Context.createPackageContext(String, int). Note that you must add this package to org.robolectric.shadows.ShadowPackageManager#addPackage(android.content.pm.PackageInfo) first.
    org.robolectric.annotation.Config.resourceDir()
    If you are using at least Android Studio 3.0 alpha 5 or Bazel's android_local_test please migrate to the preferred way to configure
    org.robolectric.annotation.Implements.looseSignatures()
    Use the ClassName annotation or the Implementation.methodName() annotation parameter instead.
  • Deprecated Enum Constants
    Enum Constant
    Description
    org.robolectric.annotation.LooperMode.Mode.LEGACY
    use LooperMode.PAUSED
    org.robolectric.annotation.SQLiteMode.Mode.LEGACY
    This mode is obsolete and will be removed soon.
    org.robolectric.annotation.TextLayoutMode.Mode.LEGACY
    LEGACY mode is inaccurate, has known bugs and will be removed in a future release.
    org.robolectric.annotation.TextLayoutMode.Mode.REALISTIC
    REALISTIC is the default mode and does not need to be stated explicitly.
  • Deprecated Annotation Type Elements
    Annotation Type Element
    Description
    org.robolectric.annotation.Config.assetDir()
    If you are using at least Android Studio 3.0 alpha 5 or Bazel's android_local_test please migrate to the preferred way to configure
    org.robolectric.annotation.Config.libraries()
    If you are using at least Android Studio 3.0 alpha 5 or Bazel's android_local_test please migrate to the preferred way to configure
    org.robolectric.annotation.Config.manifest()
    If you are using at least Android Studio 3.0 alpha 5 or Bazel's android_local_test please migrate to the preferred way to configure builds http://robolectric.org/getting-started/
    org.robolectric.annotation.Config.packageName()
    To change your package name please override the applicationId in your build system. Changing package name here is broken as the package name will no longer match the package name encoded in the arsc resources file. If you are looking to simulate another application you can create another applications Context using Context.createPackageContext(String, int). Note that you must add this package to org.robolectric.shadows.ShadowPackageManager#addPackage(android.content.pm.PackageInfo) first.
    org.robolectric.annotation.Config.resourceDir()
    If you are using at least Android Studio 3.0 alpha 5 or Bazel's android_local_test please migrate to the preferred way to configure
    org.robolectric.annotation.Implements.looseSignatures()
    Use the ClassName annotation or the Implementation.methodName() annotation parameter instead.