During compilation, all classes from all referenced libraries, that their full name (package + class) starts with one of the above prefixes, will not be included in the APK.
Why is it useful?
Smaller APK, faster compilation and faster installation. This is especially useful when referencing the large google play services library.
Removing libraries based on the selected build configuration. Like all other attributes you can use compilation symbols to add or remove this attribute.
Removing unsupported classes. For example, Amazon rejects APKs that include the RingtoneManager classes. So instead of modifying the Phone library, you can exclude the problematic classes.
As google play services is the main candidate for this feature, any prefix that starts with a dot will be converted to google play services package (com.google.android.gms).
If you are only interested in the maps functionality of google play services:
isn't it better if unused classes removed automatically by compiler? like a future which is exist in b4a named Clean Project ?
i know maybe this is headache(or not for u) when compiler need to looking for relations between classes and need it's own strategy,but u can have this in your mind as a wish for the next version of the next version.
any way this is really great future at all and thank u.
CreateResource creates an XML resource file. In the above example a file named theme.xml will be created under res\values.
This makes it easier to customize the themes, all from the manifest editor.
Remember that the manifest editor supports conditional compilation. So it is also possible to change the resources based on the selected build.
I suppose you are sure about this. The compiler knows if a routine of a my class module is unused: cannot it "explore" the jar, search for unused public routines in the project and exclude them?
Seems to be very costly since we can do it by hand
Edit: sorry, what I mean is : the compiler should do this each compilation time // we do it one time when we create the app and can change it after to adapt
The full answer is that the compiler can strip unused classes but not without mistakes. With mistakes I mean that it will remove required classes. Think about the usage of reflection inside a library (and there are such usages). A static analyzer will not be able to know which classes are used.
For further discussions about this topic, please start a new thread.
Seems to be very costly since we can do it by hand
Edit: sorry, what I mean is : the compiler should do this each compilation time // we do it one time when we create the app and can change it after to adapt
I know, but we will spend more time than the compiler and we could make mistakes.
If necessary, we could choose an "exclusionary compilation" only for the final release
The full answer is that the compiler can strip unused classes but not without mistakes. With mistakes I mean that it will remove required classes. Think about the usage of reflection inside a library (and there are such usages). A static analyzer will not be able to know which classes are used.
For further discussions about this topic, please start a new thread.
The full answer is that the compiler can strip unused classes but not without mistakes. With mistakes I mean that it will remove required classes. Think about the usage of reflection inside a library (and there are such usages). A static analyzer will not be able to know which classes are used.
For #ExcludeClasses, does there exist some list of all classes that can be excluded, so that I can examine the list and then determine what I can Exclude?