dji-sdk / Mobile-UXSDK-Android

DJI Mobile UXSDK is a suite of product agnostic UI objects that fast tracks the development of Android applications using the DJI Mobile SDK.
Other
152 stars 111 forks source link

Cannot use Android Layout editor with widgets #5

Open kenargo opened 7 years ago

kenargo commented 7 years ago

The sample itself cannot show the widgets (see below output in Android Studio) and this makes it very difficult to design UI using the widgets.

The following classes could not be instantiated: - dji.ui.widget.FPVOverlayWidget (Open Class, Show Exception, Clear Cache) - dji.ui.widget.config.CameraConfigWBWidget (Open Class, Show Exception, Clear Cache) - dji.ui.panel.PreFlightCheckListPanel (Open Class, Show Exception, Clear Cache) - dji.ui.widget.VideoSignalWidget (Open Class, Show Exception, Clear Cache) - dji.ui.widget.TakeOffWidget (Open Class, Show Exception, Clear Cache) - dji.ui.panel.CameraSettingAdvancedPanel (Open Class, Show Exception, Clear Cache) - dji.ui.widget.config.CameraConfigISOWidget (Open Class, Show Exception, Clear Cache) - dji.ui.widget.FocusModeWidget (Open Class, Show Exception, Clear Cache) - dji.ui.widget.AutoExposureLockWidget (Open Class, Show Exception, Clear Cache) - dji.ui.widget.config.CameraConfigEVWidget (Open Class, Show Exception, Clear Cache) - dji.ui.widget.PreFlightStatusWidget (Open Class, Show Exception, Clear Cache) - dji.ui.widget.CameraConfigStorageWidget (Open Class, Show Exception, Clear Cache) - dji.ui.widget.RemoteControlSignalWidget (Open Class, Show Exception, Clear Cache) - dji.ui.widget.controls.CameraControlsWidget (Open Class, Show Exception, Clear Cache) - dji.ui.panel.CameraSettingExposurePanel (Open Class, Show Exception, Clear Cache) - dji.ui.widget.config.CameraConfigApertureWidget (Open Class, Show Exception, Clear Cache) - dji.ui.widget.FPVWidget (Open Class, Show Exception, Clear Cache) - dji.ui.widget.GPSSignalWidget (Open Class, Show Exception, Clear Cache) - dji.ui.widget.FocusExposureSwitchWidget (Open Class, Show Exception, Clear Cache) - dji.ui.widget.VisionWidget (Open Class, Show Exception, Clear Cache) - dji.ui.widget.BatteryWidget (Open Class, Show Exception, Clear Cache) - dji.ui.widget.ReturnHomeWidget (Open Class, Show Exception, Clear Cache) - dji.ui.widget.RemainingFlightTimeWidget (Open Class, Show Exception, Clear Cache) - dji.ui.widget.dashboard.DashboardWidget (Open Class, Show Exception, Clear Cache) - dji.ui.widget.FlightModeWidget (Open Class, Show Exception, Clear Cache) - dji.ui.widget.WiFiSignalWidget (Open Class, Show Exception, Clear Cache) - dji.ui.widget.config.CameraConfigShutterWidget (Open Class, Show Exception, Clear Cache) - dji.ui.widget.ConnectionWidget (Open Class, Show Exception, Clear Cache) Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE. If this is an unexpected error you can also try to build the project, then manually refresh the layout. Exception Details java.lang.VerifyError: Expecting a stackmap frame at branch target 18 Exception Details: Location: dji/ui/base/a.onLayout_Original(ZIIII)V @8: ifnull Reason: Expected stackmap frame at this location. Bytecode: 0x0000000: 2ab6 0060 3a06 1906 c600 0a2a b400 20c7 0x0000010: 0011 2a1b 1c1d 1504 1505 b700 a2a7 004a 0x0000020: 1906 b600 7f3a 0719 07c6 003e 0336 0815 0x0000030: 082a b400 20b6 0082 a200 2f19 0715 0832 0x0000040: 3a09 1909 c100 849a 001a 2ab4 0020 1508 0x0000050: b600 88c0 000d 3a0a 1906 190a 1909 b600 0x0000060: a584 0801 a7ff cbb1   at java.lang.Class.getDeclaredConstructors0(Class.java:-2)   at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)   at java.lang.Class.getConstructor0(Class.java:3075)   at java.lang.Class.getConstructor(Class.java:1825)   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)   at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:858)   at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)   at android.view.LayoutInflater.rInflate(LayoutInflater.java:834)   at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)   at android.view.LayoutInflater.inflate(LayoutInflater.java:518)   at android.view.LayoutInflater.inflate(LayoutInflater.java:397) Copy stack to clipboard

zoemcateedji commented 7 years ago

Thanks for the feedback! We will have to look at working on this for future development.

talobin commented 6 years ago

@kenargo Please check 4.4.1 and see if the issue still exists. Thanks!

vikram51 commented 6 years ago

Using 4.4.1 version and still issue exist

molta3001 commented 5 years ago

same in 4.10

linjian99666 commented 5 years ago

waht's the problem? why "Caused by: android.view.InflateException: Binary XML file line #28: Error inflating class dji.ux.widget.FPVWidget" I'm crazy now!!

kenargo commented 5 years ago

It's a know issue.  The widgets access code at design time which results in the widgets throwing an exception and them the designer just shows a blank box in their place.

I haven't heard of any estimated fix time and I suspect now that DJI plans to release the wishes as open source the fix likely will come from the community after the release.   Just guessing.

⁣Get BlueMail for Android ​

On Aug 28, 2019, 8:31 PM, at 8:31 PM, linjian notifications@github.com wrote:

waht's the problem? why "Caused by: android.view.InflateException: Binary XML file line #28: Error inflating class dji.ux.widget.FPVWidget" I'm crazy now!!

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/dji-sdk/Mobile-UXSDK-Android/issues/5#issuecomment-526006176

linjian99666 commented 5 years ago

ok thanks for reply

I'm guessing DJI developer can't solve the problem or you must pay for it , anyhow , I just expect they can solve the problem quickly.

Marcello09 commented 4 years ago

I am also struggling with this issue. Hard to use the UX elements and position them correctly if they can't be previewed. Are there any updates on this issue?

Chickinnick commented 4 years ago

The issue is present in 4.11.1 Using androidx

mayurpatil307 commented 3 years ago

Facing the same issue.

alexanderboyko commented 3 years ago

have same issue with latest libs version:

The following classes could not be instantiated: - dji.ux.internal.exposure.CameraISOAndEISettingWidget (Open Class, Show Exception, Clear Cache) - dji.ux.panel.CameraSettingExposurePanel (Open Class, Show Exception, Clear Cache) - dji.ux.widget.VisionWidget (Open Class, Show Exception, Clear Cache) - dji.ux.widget.BatteryWidget (Open Class, Show Exception, Clear Cache) - dji.ux.internal.exposure.CameraShutterSettingWidget (Open Class, Show Exception, Clear Cache) - dji.ux.internal.exposure.CameraEVSettingWidget (Open Class, Show Exception, Clear Cache)

Devoney commented 1 year ago

Still experiencing this issue in Android Studio with com.dji:dji-sdk:4.16.3 and com.dji:dji-uxsdk:4.16.2.