You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't believe the unusual configuration approach overriding the leak_canary_watcher_watch_dismissed_dialogs resource is compatible with non-transitive R classes (android.nonTransitiveRClass=true). Setting that resource in app code would simply create a new resource that is private to the app.
Non-transitive R classes are the default in Android now.
The text was updated successfully, but these errors were encountered:
In essence, it creates a per-module namespace for the resources defined in the module. Before, in the source, all your resources would look like org.example.myapp.R.someresource, now they look like org.example.myapp.mymodule.R.someresource and org.example.myapp.myothermodule.R.someresource.
A module with non-transitive R classes turned on (the default now) cannot override another module's/library's resource anymore, because for compilation purposes the module's resource effectively ends up in the module's own resource namespace as a brand new resource. It gets its own numeric resource ID assigned at the end of the build.
Easiest way to verify this for yourself would be to override one of those UI-related leakcanary resources from a module with the android.nonTransitiveRClass flag true & false. Then you'd see changes in the UI.
I asked the god of Gradle and he said that once you set android.nonTransitiveRClass=true then you indeed cannot override resources from dependencies in any com.android.library modules, however you can still do that in your com.android.application module. Not ideal but at least that's a workaround.
leakcanary 2.10
I don't believe the unusual configuration approach overriding the
leak_canary_watcher_watch_dismissed_dialogs
resource is compatible with non-transitive R classes (android.nonTransitiveRClass=true
). Setting that resource in app code would simply create a new resource that is private to the app.Non-transitive R classes are the default in Android now.
The text was updated successfully, but these errors were encountered: