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
{{ message }}
Repository navigation
Two drawables are being put in the release APKs #857
ObjectBox version (are using the latest version?): 2.5.1, the latest one
Reproducibility: always
Reproducing the bug
Description
Using ObjectBox adds two drawables to the final APK, objectbox_notification and objectbox_stop. They shouldn't be there. I don't expect the library to launch notifications. And in case it did, I prefer it to use the apps icon, not something the user doesn't know about.
We should move it from objectox-android to objectbox-android-objectbrowser, incl. AndroidObjectBrowser code (just keep a shell so release builds work). https://docs.objectbox.io/data-browser
I checked if I was using AndroidObjectBrowser and nope... and I'm also using shrinkResources true.
I think it's something related to ProGuard. I'm applying this rule, that it's too broad for sure:
# Objectbox things
-keep class io.objectbox.** { *; }
-dontwarn io.objectbox.**
I'm doing it because in some previous version I needed it or you recommended it in the docs or something like that, but now I can't find anything related to it in your readme. Maybe I could remove it? May you confirm it?
Activity
greenrobot-team commentedon May 18, 2020
Thanks for reporting.
The notification is used by the data browser.
objectox-androidtoobjectbox-android-objectbrowser, incl.AndroidObjectBrowsercode (just keep a shell so release builds work).https://docs.objectbox.io/data-browser
@rocboronat For an immediate solution: If you include
objectbox-androidand don't createAndroidObjectBrowseron release builds the drawables shouldn't be referenced in any code. Then R8 should be able to remove them, assumingshrinkResources true.https://developer.android.com/topic/performance/reduce-apk-size#reduce-resources
rocboronat commentedon May 18, 2020
Thanks for your quick reply! :·)
I checked if I was using
AndroidObjectBrowserand nope... and I'm also usingshrinkResources true.I think it's something related to ProGuard. I'm applying this rule, that it's too broad for sure:
I'm doing it because in some previous version I needed it or you recommended it in the docs or something like that, but now I can't find anything related to it in your readme. Maybe I could remove it? May you confirm it?
Thanks a lot again! 👍
greenrobot-team commentedon May 18, 2020
objectbox-androidships with ProGuard/R8 rules, you should not have to add your own rules any longer.rocboronat commentedon May 18, 2020
Cool. I'll remove them then. Thanks a lot!
I'll try and tell you if those images disappeared.
By the way, maybe it is worth to mention in the readme that no ProGuard rules are needed?
rocboronat commentedon May 18, 2020
Op, didn't work. The drawables are still there.
greenrobot-team commentedon Jun 30, 2020
With
2.7.0theobjectbox-androidartifact will no longer contain any data browser resources. Thanks again.greenrobot-team commentedon Aug 3, 2020
Update: the next version is actually
2.7.0.