Coder Social home page Coder Social logo

Error: java.lang.NoSuchMethodError: no static method "Landroid/view/View;.setPadding(IIII)V" about nativescript-advanced-webview HOT 5 OPEN

bradmartin avatar bradmartin commented on June 10, 2024 4
Error: java.lang.NoSuchMethodError: no static method "Landroid/view/View;.setPadding(IIII)V"

from nativescript-advanced-webview.

Comments (5)

maxorlovsky avatar maxorlovsky commented on June 10, 2024

Have exact same issue. Here's the stacktrace from NS-Vue, might be helpful. I tried to understand what might be the problem, but it seems like it's not with this plugin directly, but rather dependency, which is https://github.com/triniwiz/fancy-advanced-webview

You don't even need to init advance webview to receive the error. Just install plugin as dependency.

JS: Error: Could not load CSS from app.css: Error: require's first parameter should be string
JS: HMR: Hot Module Replacement Enabled. Waiting for signal.
JS: 'NativeScript-Vue has "Vue.config.silent" set to true, to see output logs set it to false.'
JS: 'topmost() is deprecated. Use Frame.topmost() instead.'
JS: 'topmost() is deprecated. Use Frame.topmost() instead.'
System.err: An uncaught Exception occurred on "main" thread.
System.err: 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: onBackgroundOrBorderPropertyChanged(file:///node_modules/@nativescript/core/ui/styling/background.js:88:19)
System.err:     at View._redrawNativeBackground(file:///node_modules/@nativescript/core/ui/core/view/view.js:777:28)
System.err:     at View.<computed>(file:///node_modules/@nativescript/core/ui/core/view/view.js:757:13)
System.err:     at applyAllNativeSetters(file:///node_modules/@nativescript/core/ui/core/properties/properties.js:1065:37)
System.err:     at initNativeView(file:///node_modules/@nativescript/core/ui/core/properties/properties.js:992:8)
System.err:     at ViewBase.onResumeNativeUpdates(file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:633:21)
System.err:     at ViewBase._resumeNativeUpdates(file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:278:17)
System.err:     at ViewBase.onLoaded(file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:232:13)
System.err:     at View.onLoaded(file:///node_modules/@nativescript/core/ui/core/view/view.js:249:34)
System.err:     at (file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:317:89)
System.err:     at ViewBase.callFunctionWithSuper(file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:310:8)
System.err:     at ViewBase.callLoaded(file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:317:13)
System.err:     at ViewBase.loadView(file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:445:17)
System.err:     at (file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:234:18)
System.err:     at RadSideDrawer.eachChildView(file:///node_modules/nativescript-ui-sidedrawer/ui-sidedrawer.common.js:148:12)
System.err:     at ViewCommon.eachChild(file:///node_modules/@nativescript/core/ui/core/view/view-common.js:915:13)
System.err:     at ViewBase.onLoaded(file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:233:13)
System.err:     at View.onLoaded(file:///node_modules/@nativescript/core/ui/core/view/view.js:249:34)
System.err:     at (file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:317:89)
System.err:     at ViewBase.callFunctionWithSuper(file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:310:8)
System.err:     at ViewBase.callLoaded(file:///node_modules/@nativescript/core/ui/core/view-base/view-base.js:317:13)
System.err:     at ActivityCallbacksImplementation.onStart(file:///node_modules/@nativescript/core/ui/frame/frame.js:888:21)
System.err:     at NativeScriptActivity.onStart(file:///node_modules/@nativescript/core/ui/frame/activity.js:29:24)
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:1391)
System.err:     at android.app.Activity.performStart(Activity.java:7157)
System.err:     at android.app.ActivityThread.handleStartActivity(ActivityThread.java:2937)
System.err:     at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:180)
System.err:     at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:165)
System.err:     at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:142)
System.err:     at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
System.err:     at android.os.Handler.dispatchMessage(Handler.java:106)
System.err:     at android.os.Looper.loop(Looper.java:193)
System.err:     at android.app.ActivityThread.main(ActivityThread.java:6669)
System.err:     at java.lang.reflect.Method.invoke(Native Method)
System.err:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
System.err: Caused by: java.lang.NoSuchMethodError: no static method "Landroid/view/View;.setPadding(IIII)V"
System.err:     ... 21 more
Successfully synced application com.socios.socios on device emulator-5554.

And if you remove nativeView.setPadding(leftPadding, topPadding, rightPadding, bottomPadding); from background.android.js from @nativescript/core all is fine beside the styling.

from nativescript-advanced-webview.

ricky-bos avatar ricky-bos commented on June 10, 2024

I'm getting a similar problem

System.err: An uncaught Exception occurred on "main" thread.
System.err: Calling js method onViewAttachedToWindow failed
System.err: Error: java.lang.NoSuchMethodError: no static method "Landroid/animation/Animator;.addListener(Landroid/animation/Animator$AnimatorListener;)V"
System.err:
System.err: StackTrace:
System.err: setupExitAndPopEnterAnimation(file:///node_modules/tns-core-modules/ui/frame/fragment.transitions.js:510:17)
System.err: at setupAllAnimation(file:///node_modules/tns-core-modules/ui/frame/fragment.transitions.js:519:4)
System.err: at _setAndroidFragmentTransitions(file:///node_modules/tns-core-modules/ui/frame/fragment.transitions.js:108:8)
System.err: at Frame._navigateCore(file:///node_modules/tns-core-modules/ui/frame/frame.js:296:31)
System.err: at FrameBase.performNavigation(file:///node_modules/tns-core-modules/ui/frame/frame-common.js:265:13)
System.err: at FrameBase._processNextNavigationEntry(file:///node_modules/tns-core-modules/ui/frame/frame-common.js:256:21)
System.err: at Frame._processNextNavigationEntry(file:///node_modules/tns-core-modules/ui/frame/frame.js:152:57)
System.err: at Frame._onAttachedToWindow(file:///node_modules/tns-core-modules/ui/frame/frame.js:127:13)
System.err: at AttachListener.onViewAttachedToWindow(file:///node_modules/tns-core-modules/ui/frame/frame.js:39:26)
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.gen.java.lang.Object_vendor_57138_28_AttachListener.onViewAttachedToWindow(Object_vendor_57138_28_AttachListener.java:18)
System.err: at android.view.View.dispatchAttachedToWindow(View.java:15520)
System.err: at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2916)
System.err: at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2923)
System.err: at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2923)
System.err: at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2923)
System.err: at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2923)
System.err: at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2923)
System.err: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1526)
System.err: at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1254)
System.err: at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6337)
System.err: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874)
System.err: at android.view.Choreographer.doCallbacks(Choreographer.java:686)
System.err: at android.view.Choreographer.doFrame(Choreographer.java:621)
System.err: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860)
System.err: at android.os.Handler.handleCallback(Handler.java:751)
System.err: at android.os.Handler.dispatchMessage(Handler.java:95)
System.err: at android.os.Looper.loop(Looper.java:154)
System.err: at android.app.ActivityThread.main(ActivityThread.java:6119)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
System.err: Caused by: java.lang.NoSuchMethodError: no static method "Landroid/animation/Animator;.addListener(Landroid/animation/Animator$AnimatorListener;)V"
System.err: ... 28 more
JS: 'Error: Error: Calling js method onViewAttachedToWindow failed
JS: Error: java.lang.NoSuchMethodError: no static method "Landroid/animation/Animator;.addListener(Landroid/animation/Animator$AnimatorListener;)V"'

from nativescript-advanced-webview.

saeb-panahifar avatar saeb-panahifar commented on June 10, 2024

Me too.

from nativescript-advanced-webview.

 avatar commented on June 10, 2024

I'm also having this problem. It's preventing me from updating my project's tns-android past v6.1.

from nativescript-advanced-webview.

JamesRoome avatar JamesRoome commented on June 10, 2024

I've created a PR that should solve the issue.

from nativescript-advanced-webview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.