Can not resolve runOnUiThread when compiling DJI Mobile SDK

I encountered this problem when compiling DJI Mobile-SDK.
The problem appeared in
LookAtMissionView.java: line 59 and line 334.
insert image description here
Here import static com.google.android.gms.internal.zzahn.runOnUiThread failed, so it was not imported successfully. The function runOnUiThread, and look at com.google.android.gms.internal.zzahn, there is no such function. I found out that this seemingly meaningless zzahn is the result of proguard obfuscation, but it is actually meaningless. The function runOnUiThread may not exist in gms. This function means to put an executable Runable object in the Ui thread for execution.
A big brother in the QQ group said that you can directly write a handler and put it in the mainloop, so the following code is changed to this, and it can be compiled successfully:
Comment out the import that fails

Create a Handler object

Throw the Runable object into the mainlooper for execution

Guess you like

Origin blog.csdn.net/u013238941/article/details/126568583