TeamAmaze / TeamAmaze/AmazeFileManager

IllegalReflection in :app:testPlayDebugUnitTest build

Open
#2,507 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-CICD Area-CodeHealth Area-Test Issue-Task (low)
Dominant language
Kotlin
Stars
6.4k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
1

Description

gradle :app:testPlayDebugUnitTest gives:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.robolectric.util.ReflectionHelpers (file:/home/emmanuel/.gradle/caches/transforms-2/files-2.1/ef0a43edd925339f8d399fc7cb98ac45/jetified-shadowapi-4.3.1.jar) to field java.lang.reflect.Field.modifiers
WARNING: Please consider reporting this to the maintainers of org.robolectric.util.ReflectionHelpers
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.robolectric.util.ReflectionHelpers (file:/home/emmanuel/.gradle/caches/transforms-2/files-2.1/ef0a43edd925339f8d399fc7cb98ac45/jetified-shadowapi-4.3.1.jar) to field java.lang.reflect.Field.modifiers
WARNING: Please consider reporting this to the maintainers of org.robolectric.util.ReflectionHelpers
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.robolectric.util.ReflectionHelpers (file:/home/emmanuel/.gradle/caches/transforms-2/files-2.1/ef0a43edd925339f8d399fc7cb98ac45/jetified-shadowapi-4.3.1.jar) to field java.lang.reflect.Field.modifiers
WARNING: Please consider reporting this to the maintainers of org.robolectric.util.ReflectionHelpers
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.robolectric.util.ReflectionHelpers (file:/home/emmanuel/.gradle/caches/transforms-2/files-2.1/ef0a43edd925339f8d399fc7cb98ac45/jetified-shadowapi-4.3.1.jar) to field java.lang.reflect.Field.modifiers
WARNING: Please consider reporting this to the maintainers of org.robolectric.util.ReflectionHelpers
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.robolectric.util.ReflectionHelpers (file:/home/emmanuel/.gradle/caches/transforms-2/files-2.1/ef0a43edd925339f8d399fc7cb98ac45/jetified-shadowapi-4.3.1.jar) to field java.lang.reflect.Field.modifiers
WARNING: Please consider reporting this to the maintainers of org.robolectric.util.ReflectionHelpers
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.robolectric.util.ReflectionHelpers (file:/home/emmanuel/.gradle/caches/transforms-2/files-2.1/ef0a43edd925339f8d399fc7cb98ac45/jetified-shadowapi-4.3.1.jar) to field java.lang.reflect.Field.modifiers
WARNING: Please consider reporting this to the maintainers of org.robolectric.util.ReflectionHelpers
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.robolectric.util.ReflectionHelpers (file:/home/emmanuel/.gradle/caches/transforms-2/files-2.1/ef0a43edd925339f8d399fc7cb98ac45/jetified-shadowapi-4.3.1.jar) to field java.lang.reflect.Field.modifiers
WARNING: Please consider reporting this to the maintainers of org.robolectric.util.ReflectionHelpers
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.robolectric.util.ReflectionHelpers (file:/home/emmanuel/.gradle/caches/transforms-2/files-2.1/ef0a43edd925339f8d399fc7cb98ac45/jetified-shadowapi-4.3.1.jar) to field java.lang.reflect.Field.modifiers
WARNING: Please consider reporting this to the maintainers of org.robolectric.util.ReflectionHelpers
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.robolectric.util.ReflectionHelpers (file:/home/emmanuel/.gradle/caches/transforms-2/files-2.1/ef0a43edd925339f8d399fc7cb98ac45/jetified-shadowapi-4.3.1.jar) to field java.lang.reflect.Field.modifiers
WARNING: Please consider reporting this to the maintainers of org.robolectric.util.ReflectionHelpers
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running :app:testPlayDebugUnitTest and inspect the reported org.robolectric.util.ReflectionHelpers access from shadowapi-4.3.1.jar. Trace how this dependency is used in the test setup and determine a compatibility resolution; done means the test task completes without these illegal reflective access warnings.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, kotlin
Domain
build-system, mobile, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.