java - Android/Eclipse: how to prioritize a local over a library package -
i using eclipse , have android application composed of 2 packages, core package app , settings package stores series of global settings app (e.g. in-app purchase market key app). app imports library (e.g. in-app wrapper lib), in turn uses copy of aforementioned global settings package.
how i've implemented this, date, 3 projects; app, library , third 1 for settings (as library). settings lib exported jar, put in build path of library , referenced library top level app, avoid dreaded "multiple dex files" error (as happen if reference mysettings project mylib). overall, looks bit this:
myapp (mylib referenced) - core_app_logic - settings mylib (mysettings.jar in build path) - lib_logic mysettings - settings
resources prioritized correctly; in myapp used rather in mylib. however, while myapp use myapp.settings package, mylib instead use mysettings.settings one.
am missing approach, or should looking @ different one?
i can answer own question, can because left out information in original question turned out relevant. in end silly mistake me - nonetheless, answer may others in future have no monopoly on silly mistakes.
in essence, there no problems above design. error in settings classes, set, example, various variables wanted use , override as:
public final static string myvar = "foobar";
which naturally meant myapp.settings.myvar not override settings.myvar marked final. removed final tokens settings variables in settings , myapp.settings overrode them correctly.
Comments
Post a Comment