willowtreeapps / Hyperion-Android

App Debugging & Inspection Tool for Android
MIT License
1.95k stars 144 forks source link

[Bug] Android 11 (sdk 30) is not supported #197

Closed repitch closed 4 years ago

repitch commented 4 years ago

I have two cases, and both with the simple solution (just rename the method), but they differs with difficulty of reproduction There is no need to up your target/compile version to fix that problem!

Case 1 (Simple one)

Result:

hyperion-core/src/main/java/com/willowtreeapps/hyperion/core/internal/HyperionInitProvider.java:28: error: requireContext() in HyperionInitProvider cannot override requireContext() in ContentProvider
    private Context requireContext() {
                    ^
  overridden method is final

The problem is that ContentProvider class from android sdk (api 30) already have public final Context requireContext() method that you are trying to override in HyperionInitProvider

Easy fix

rename your private method, e.g. call it requireContextInternal() to avoid that conflict

Case 2 (Can't reproduce on your sample project)