Closed NickIliev closed 4 years ago
so @NickIliev do we need to update the plugin lib versions?
@bradmartin after some additional test (via an app that is using the plugin extensively) it seems that the issue is still appearing (but in other circumstances). The thing is that the tns-core-modules
are working with version 1.0.0 of androidx.appcompat while this plugin is using an RC version (set here). The RC version has some breaking changes which are causing the Fragment manager logic to crash on some navigation and lifecycle scenarios.
So that said, in the current state the plugin is causing the apps to crash with various errors. The modules team (tns-core-modules) are going to wait for an official version of the appcompat before bumping (which hopefully means appcompat@1.2.0) so as of this moment we are advising for reverting to version 1.0.0.
Is there any update on this
I have the same problem.
Hi @bradmartin, @NickIliev Any workarounds, if available or timeline to wait for this fix. Please suggest.
Hi @bradmartin @NickIliev,
I echo @AmithRamesh 's comment. Any workarounds or feedback on this?
Having this issue as well.
After upgrading NS to 6.3.0 version same issue still remains
I'm using another plugin that also relies on androidx.appcompat 1.1.0, downgrading isn't really an option. I'm quite stuck now, is there any other workaround for this issue?
Seems that 1.1.0 is the current stable version.
This is really annoying. Any update on this issue?
New version published under 5.0.0
which is compatible with NS 6.3.2 (tested successfully with the demo app on this repo).
Please open a new issue if still encountering with 6.3.2+, I assume it will work on 6.3.0, but did not test.
New version 5.0.0 having same issue with NS 6.4.1 Android. App crashes immediately on launch with error: Caused by: java.lang.NoSuchMethodError: no static method "Landroid/os/Handler;.postDelayed(Ljava/lang/Runnable;J)Z"
Can you see if it works for you with 6.3.2
@pvcoelho ? It did when I updated the plugin last month, if it fails for you, then possibly you have a build issue locally. I'll try updating the demo app later to confirm it works fine if I have time.
I couldn't downgrade to 6.3.2 as the project as already been deployed to apple store (iOS) and working fine in 6.4.0 (iOS). I could nevertheless try it in version 6.4.0 (Android) but it crashes with error: Caused by: java.lang.NoSuchMethodError: no static method "Landroid/view/View;.setPadding(IIII)V"
Any news about this issue? Thanks in advance.
This is working in the demo app with latest versions last I checked. It's possible there is a second dependency issue causing this bc it seems to work by itself.
This problem make me crazy 🆘
😄 understand that @giammo , I wish I knew more about a way to narrow down which dependency/lib is causing conflicts but I'm stumped myself as I've not ran into this on a project I've worked on.
same issue with tns 6.7.8
(on Android)
App crashes
JS: Application Launched
System.err: An uncaught Exception occurred on "main" thread.
System.err: Unable to start activity ComponentInfo{com.example/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onStart failed
System.err: Error: java.lang.NoSuchMethodError: no static method "Landroid/view/View;.setPadding(IIII)V"
System.err:
System.err: StackTrace:
System.err: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.exampleJS: Application Launched
System.err: An uncaught Exception occurred on "main" thread.
System.err: Unable to start activity ComponentInfo{com.spetle/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onStart failed
System.err: Error: java.lang.NoSuchMethodError: no static method "Landroid/view/View;.setPadding(IIII)V"
System.err:
System.err: StackTrace:
System.err: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.spetle/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onStart failed
System.err: Error: java.lang.NoSuchMethodError: no static method "Landroid/view/View;.setPadding(IIII)V"
System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
System.err: at android.app.ActivityThread.-wrap11(Unknown Source:0)
System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
System.err: at android.os.Handler.dispatchMessage(Handler.java:106)
System.err: at android.os.Looper.loop(Looper.java:169)
System.err: at android.app.ActivityThread.main(ActivityThread.java:6521)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
System.err: Caused by: com.tns.NativeScriptException: Calling js method onStart failed
System.err: Error: java.lang.NoSuchMethodError: no static method "Landroid/view/View;.setPadding(IIII)V"
System.err: at com.tns.Runtime.callJSMethodNative(Native Method)
System.err: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1286)
System.err: at com.tns.Runtime.callJSMethodImpl(Runtime.java:1173)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1160)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1138)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1134)
System.err: at com.tns.NativeScriptActivity.onStart(NativeScriptActivity.java:34)
System.err: at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1335)
System.err: at android.app.Activity.performStart(Activity.java:7071)
System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2741)
System.err: ... 9 more
System.err: Caused by: java.lang.NoSuchMethodError: no static method "Landroid/view/View;.setPadding(IIII)V"/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onStart failed
System.err: Error: java.lang.NoSuchMethodError: no static method "Landroid/view/View;.setPadding(IIII)V"
System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
System.err: at android.app.ActivityThread.-wrap11(Unknown Source:0)
System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
System.err: at android.os.Handler.dispatchMessage(Handler.java:106)
System.err: at android.os.Looper.loop(Looper.java:169)
System.err: at android.app.ActivityThread.main(ActivityThread.java:6521)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
System.err: Caused by: com.tns.NativeScriptException: Calling js method onStart failed
System.err: Error: java.lang.NoSuchMethodError: no static method "Landroid/view/View;.setPadding(IIII)V"
System.err: at com.tns.Runtime.callJSMethodNative(Native Method)
System.err: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1286)
System.err: at com.tns.Runtime.callJSMethodImpl(Runtime.java:1173)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1160)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1138)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1134)
System.err: at com.tns.NativeScriptActivity.onStart(NativeScriptActivity.java:34)
System.err: at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1335)
System.err: at android.app.Activity.performStart(Activity.java:7071)
System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2741)
System.err: ... 9 more
System.err: Caused by: java.lang.NoSuchMethodError: no static method "Landroid/view/View;.setPadding(IIII)V"
Can we reopen this issue?
Due to using a specific RC version of androidx.appcompat library the plugin is now not fully compatible with NativeScript 6 and breaks all applications during navigation. The thing is that the plugin is installing a specific RC version of androidx.appcompat via the native library (fancy-advanced-webivew). This RC version of the appcompat is breaking the Fragment manager logic in NativeScript and thus causing any app that uses this plugin to fail on navigation or on app/resume.
See this issue for details https://github.com/NativeScript/NativeScript/issues/7901