Closed jarmani closed 9 months ago
Android 7.1.X (API level 25)
JUSTIFICATION_MODE_INTER_WORD and JUSTIFICATION_MODE_NONE appeared in API level 26 but the code check for level >= 25 :
[textAlignmentProperty.setNative](value: CoreTypes.TextAlignmentType) { const view = this.nativeTextViewProtected; if (android.os.Build.VERSION.SDK_INT >= 25) { if ((value as any) === 'justify') { view.setJustificationMode(android.text.Layout.JUSTIFICATION_MODE_INTER_WORD); } else { view.setJustificationMode(android.text.Layout.JUSTIFICATION_MODE_NONE); view.setGravity(getHorizontalGravity(value) | getVerticalGravity(this.verticalTextAlignment)); } } else { view.setGravity(getHorizontalGravity(value) | getVerticalGravity(this.verticalTextAlignment)); } }
causing the following error :
com.tns.NativeScriptException: Calling js method onCreateView failed Error: java.lang.NoSuchFieldError: no "I" field "JUSTIFICATION_MODE_NONE" in class "Landroid/text/Layout;" or its superclasses
@jarmani thanks for the report. fixed in 1.2.2
Which platform(s) does your issue occur on?
Android 7.1.X (API level 25)
Please, tell us how to recreate the issue in as much detail as possible.
JUSTIFICATION_MODE_INTER_WORD and JUSTIFICATION_MODE_NONE appeared in API level 26 but the code check for level >= 25 :
causing the following error :
com.tns.NativeScriptException: Calling js method onCreateView failed Error: java.lang.NoSuchFieldError: no "I" field "JUSTIFICATION_MODE_NONE" in class "Landroid/text/Layout;" or its superclasses