Please select Into the mobile phone version | Continue to access the computer ver.
Apparently R8 removes classes and interfaces
30 0 11-18 05:03
Uploading and Loding Picture ...(0/1)
o(^-^)o
balma
lvl.1

Argentina
Offline

I'm trying to integrate DJI SDK to an Android App (app) but in a separate module (djisdk):
[color=var(--blue-700)]Project Structure
The problem is that after compilation finishes, the Build Output shows:
Executing tasks: [clean, :djisdk:assembleDebug, :app:assembleDebug] [color=var(--highlight-keyword)]in project ~/djisdk/example/android  > Task :clean > Task :app:clean UP-TO-DATE > Task :djisdk:clean UP-TO-DATE > Task :djisdk:preBuild UP-TO-DATE > Task :djisdk:extractProguardFiles > Task :djisdk:preDebugBuild > Task :djisdk:checkDebugManifest > Task :djisdk:generateDebugBuildConfig > Task :djisdk:generateDebugResValues > Task :djisdk:mergeDebugShaders > Task :djisdk:compileDebugShaders > Task :djisdk:generateDebugAssets > Task :djisdk:packageDebugAssets > Task :djisdk:packageDebugRenderscript NO-SOURCE > Task :djisdk:prepareLintJarForPublish UP-TO-DATE > Task :djisdk:compileDebugAidl NO-SOURCE > Task :djisdk:compileDebugRenderscript NO-SOURCE > Task :djisdk:generateDebugResources > Task :djisdk:packageDebugResources > Task :djisdk:processDebugManifest > Task :djisdk:parseDebugLibraryResources > Task :djisdk:processDebugJavaRes NO-SOURCE > Task :djisdk:mergeDebugJniLibFolders > Task :djisdk:generateDebugLibraryProguardRules > Task :app:compileFlutterBuildDebug > Task :djisdk:mergeDebugNativeLibs > Task :djisdk:stripDebugDebugSymbols > Task :djisdk:transformNativeLibsWithSyncJniLibsForDebug > Task :app:packLibsflutterBuildDebug > Task :app:preBuild UP-TO-DATE > Task :app:extractProguardFiles > Task :app:preDebugBuild > Task :app:compileDebugAidl NO-SOURCE > Task :djisdk:generateDebugRFile > Task :djisdk:compileDebugKotlin > Task :app:checkDebugManifest > Task :app:compileDebugRenderscript NO-SOURCE > Task :app:generateDebugBuildConfig > Task :app:cleanMergeDebugAssets UP-TO-DATE > Task :djisdk:javaPreCompileDebug > Task :djisdk:compileDebugJavaWithJavac > Task :djisdk:extractDebugAnnotations > Task :djisdk:mergeDebugGeneratedProguardFiles UP-TO-DATE > Task :djisdk:mergeDebugConsumerProguardFiles UP-TO-DATE > Task :djisdk:compileDebugSources > Task :app:mergeDebugShaders > Task :app:compileDebugShaders > Task :app:generateDebugAssets > Task :app:mergeDebugAssets > Task :app:copyFlutterAssetsDebug > Task :app:mainApkListPersistenceDebug > Task :djisdk:mergeDebugJavaResource > Task :djisdk:transformClassesAndResourcesWithR8ForDebug > Task :djisdk:transformClassesAndResourcesWithSyncLibJarsForDebug > Task :djisdk:bundleDebugAar > Task :djisdk:assembleDebug > Task :app:generateDebugResValues > Task :app:generateDebugResources > Task :app:createDebugCompatibleScreenManifests > Task :app:processDebugManifest > Task :app:mergeDebugResources warn: removing resource com.djisdk_example:dimen/offline_map_header_bar_title_size without [color=var(--highlight-keyword)]required [color=var(--highlight-keyword)]default value. warn: removing resource com.djisdk_example:dimen/offline_map_manager_title_size without [color=var(--highlight-keyword)]required [color=var(--highlight-keyword)]default value.  > Task :app:processDebugResources > Task :app:validateSigningDebug > Task :app:signingConfigWriterDebug > Task :djisdk:bundleLibCompileDebug > Task :app:compileDebugKotlin > Task :app:mergeDebugJniLibFolders > Task :djisdk:transformNativeLibsWithIntermediateJniLibsForDebug > Task :djisdk:bundleLibResDebug > Task :app:javaPreCompileDebug > Task :app:compileDebugJavaWithJavac > Task :app:compileDebugSources > Task :app:mergeDebugGeneratedProguardFiles UP-TO-DATE > Task :app:processDebugJavaRes NO-SOURCE > Task :djisdk:bundleLibRuntimeDebug > Task :app:mergeDebugJavaResource  > Task :app:transformClassesAndResourcesWithR8ForDebug AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: dji.sdk.util.VideoSizeCalculatorUtil$VideoSizeListener",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: dji.thirdparty.afinal.core.AsyncTask",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: com.dji.mapkit.core.maps.DJIMapView$OnDJIMapReadyCallback",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: dji.thirdparty.okhttp3.RequestBody",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: dji.keysdk.callback.ActionCallback",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: android.view.WindowInsetsAnimation$Callback",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: dji.common.util.CommonCallbacks$CompletionCallbackWith",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: com.dji.mapkit.core.maps.DJIMap$OnMarkerClickListener",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: com.here.android.mpa.common.OnEngineInitListener",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: dji.sdk.camera.Camera$HistogramCallback",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: dji.sdk.accessory.speaker.TransmissionListener",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: dji.thirdparty.io.reactivex.Observable",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: dji.sdk.camera.VideoFeeder$VideoDataListener",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: dji.thirdparty.okhttp3.Callback",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: dji.common.flightcontroller.simulator.SimulatorState$Callback",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: dji.common.accessory.SpeakerState$Callback",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: dji.thirdparty.io.reactivex.disposables.Disposable",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: dji.thirdparty.okhttp3.Interceptor",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: dji.keysdk.callback.GetCallback",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: dji.common.util.CommonCallbacks$CompletionCallback",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: dji.thirdparty.io.reactivex.Observer",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: dji.sdk.sdkmanager.DJISDKManager$SDKManagerCallback",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: dji.common.flightcontroller.FlightControllerState$Callback",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: dji.keysdk.callback.KeyListener",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: dji.common.flightcontroller.flyzone.FlyZoneState$Callback",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: dji.common.util.CommonCallbacks$CompletionCallbackWithTwoParam",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: dji.sdk.mission.waypoint.WaypointMissionOperatorListener",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: dji.keysdk.callback.SetCallback",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"} AGPBI: {[color=var(--highlight-variable)]"kind":[color=var(--highlight-variable)]"warning",[color=var(--highlight-variable)]"text":[color=var(--highlight-variable)]"Missing class: dji.thirdparty.okhttp3.ResponseBody",[color=var(--highlight-variable)]"sources":[{}],[color=var(--highlight-variable)]"tool":[color=var(--highlight-variable)]"R8"}  > Task :app:mergeDebugNativeLibs  > Task :app:stripDebugDebugSymbols Unable to strip [color=var(--highlight-keyword)]library [color=var(--highlight-variable)]'~/djisdk/example/build/app/intermediates/merged_native_libs/debug/out/lib/mips/libmapbox-gl.so' due to missing strip tool [color=var(--highlight-keyword)]for ABI [color=var(--highlight-variable)]'MIPS'. Packaging it [color=var(--highlight-keyword)]as [color=var(--highlight-keyword)]is. Unable to strip [color=var(--highlight-keyword)]library [color=var(--highlight-variable)]'~/djisdk/example/build/app/intermediates/merged_native_libs/debug/out/lib/armeabi/libmapbox-gl.so' due to missing strip tool [color=var(--highlight-keyword)]for ABI [color=var(--highlight-variable)]'ARMEABI'. Packaging it [color=var(--highlight-keyword)]as [color=var(--highlight-keyword)]is. Unable to strip [color=var(--highlight-keyword)]library [color=var(--highlight-variable)]'~/djisdk/example/build/app/intermediates/merged_native_libs/debug/out/lib/armeabi/libAMapSDK_MAP_v6_9_2.so' due to missing strip tool [color=var(--highlight-keyword)]for ABI [color=var(--highlight-variable)]'ARMEABI'. Packaging it [color=var(--highlight-keyword)]as [color=var(--highlight-keyword)]is.  > Task :app:packageDebug > Task :app:assembleDebug  BUILD SUCCESSFUL [color=var(--highlight-keyword)]in [color=var(--highlight-namespace)]1m [color=var(--highlight-namespace)]2s [color=var(--highlight-namespace)]63 actionable tasks: [color=var(--highlight-namespace)]56 executed, [color=var(--highlight-namespace)]7 up-to-date
Where you can see that task app:transformClassesAndResourcesWithR8ForDebug is emitting some warnings about "Missing classes"
What I try:
  • Disabling minify (minifyEnabled false)
    Problem is the same
  • Adding proguard rules to both app and djisdk module
    buildTypes {     release {         [color=var(--highlight-comment)]// TODO: Add your own signing config for the release build.         signingConfig signingConfigs.debug     }     debug {         minifyEnabled [color=var(--highlight-literal)]true         proguardFiles getDefaultProguardFile([color=var(--highlight-variable)]'proguard-android.txt'), [color=var(--highlight-variable)]'proguard-rules.pro'     } }
    And the proguard rules
    -keep class dji.** { *; } -keep class com.dji.** { *; } -keep class com.djisdk.** { *; }
I suspect that the problem is happening when the same task run in the djisdk module (djisdk:transformClassesAndResourcesWithR8ForDebug) but I can't figure out how to solve it
If some one have more experience dealing with this kind of problems, I would really appreciate your help

11-18 05:03
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules