Please select Into the mobile phone version | Continue to access the computer ver.
Render Problem - Android Studio is not rendering the layout
64 1 7-13 08:43
Uploading and Loding Picture ...(0/1)
o(^-^)o
djiuser_EaM5vHPip18U
lvl.1

United States
Offline

Android Studio is not rendering the layout in activity_main.xml. I can't edit the app wihtout the visual rendering. Just to be clear, I'm not talking about the emulator, this is just the layout.
Android Studio: 4.2.2, Android SDK: 28-30, DJI UXSDK: 4.14, DJI SDK: 4.14
This is the error message:

java.lang.VerifyError: Constructor must call super() or this() before return Exception Details:   Location:     dji/common/bus/UXSDKEventBus.<init>()V @0: return   Reason:     Error exists in the bytecode   Bytecode:     0000000: b12a b700 10b1                               at dji.ux.widget.FPVWidget.addSubscriptions()     at dji.ux.widget.FPVWidget.onAttachedToWindow()     at android.view.View.dispatchAttachedToWindow(View.java:20479)     at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3496)     at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3496)     at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3496)     at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3496)     at android.view.AttachInfo_Accessor.setAttachInfo(AttachInfo_Accessor.java:42)     at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:332)     at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:369)     at com.android.tools.idea.layoutlib.LayoutLibrary.createSession(LayoutLibrary.java:141)     at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:710)     at com.android.tools.idea.rendering.RenderTask.lambda$inflate$6(RenderTask.java:865)     at com.android.tools.idea.rendering.RenderExecutor$runAsyncActionWithTimeout$2.run(RenderExecutor.kt:174)     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)     at java.base/java.lang.Thread.run(Thread.java:834)
7-13 08:43
Use props
dr.ony_
lvl.1

United States
Offline

As a follow up, this error message is shown as well:

java.lang.NoClassDefFoundError: Could not initialize class dji.ux.widget.FPVOverlayWidget
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
        at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:399)
        at org.jetbrains.android.uipreview.ViewLoader.loadClass(ViewLoader.java:189)
        at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:147)
        at com.android.tools.idea.rendering.LayoutlibCallbackImpl.loadView(LayoutlibCallbackImpl.java:303)
        at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:417)
        at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:428)
        at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:332)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:959)
        at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:1121)
        at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:72)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:1095)
        at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1082)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:680)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:499)
        at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:354)
        at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:431)
        at com.android.tools.idea.layoutlib.LayoutLibrary.createSession(LayoutLibrary.java:141)
        at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:710)
        at com.android.tools.idea.rendering.RenderTask.lambda$inflate$6(RenderTask.java:865)
        at com.android.tools.idea.rendering.RenderExecutor$runAsyncActionWithTimeout$2.run(RenderExecutor.kt:174)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
7-13 09:42
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules