NativeScript / android

NativeScript for Android using v8
https://docs.nativescript.org/guide/android-marshalling
Apache License 2.0
523 stars 134 forks source link

cant disable multidex #1681

Open farfromrefug opened 2 years ago

farfromrefug commented 2 years ago

because of that line https://github.com/NativeScript/android-runtime/blob/master/build-artifacts/project-template-gradle/app/src/main/java/com/tns/NativeScriptApplication.java#L32 a user cant decide to disable multidex if possible (would make app smaller). The reason is that without multidex enabled that line would not compile. I tried a few things but it is a bit tricky to do preprocessor through gradle 7.0 (plugins not working anymore). The idea would be to use a preprocessor to get rid of the line at compilation if multidex is disabled

triniwiz commented 2 years ago

Another way would be to using it via reflection

farfromrefug commented 2 years ago

@triniwiz we cant ! it is mentioned in the doc to NOT use reflection before MultiDex.install is called https://developer.android.com/studio/build/multidex

triniwiz commented 2 years ago

Ah looks like preprocessor it is