Skip to content

DJI Mobile SDK Android V5.15.0 Compilation Blocked: Unresolved References for Core Modules (dji.v5.manager, dji.v5.utils etc.) #602

@LetRashanana

Description

@LetRashanana

Problem Description:

I am attempting to integrate the DJI Mobile SDK V5.15.0 into a new Android Studio project to develop an application for autonomous drone VIN scanning. I am using Android Studio Narwhal 2025.1.1, targeting minSdk 24, compileSdk 34, with Kotlin DSL and an Empty Views Activity template.

Despite extensive troubleshooting, I consistently encounter "Unresolved reference" errors for fundamental DJI SDK V5 classes and packages in MyApplication.kt and MainActivity.kt. These include, but are not limited to:

dji.v5.manager.sdk.DJISDKManager

dji.v5.manager.products.ProductManager

dji.v5.manager.products.aircraft.Aircraft

dji.v5.utils.common.LogUtils

dji.v5.common.error.IDJIError

And broader package references like

sdk, products, manager, common, utils.

These errors indicate that the compiler cannot find the binary definitions of these core SDK components.

Troubleshooting Steps Taken (Meticulous & Exhaustive):

Project Setup & Gradle Configuration:

Started a fresh Android Studio project (testapp) to eliminate prior issues.

Configured app/build.gradle.kts with compileSdk 34, minSdk 24, targetSdk 34, multiDexEnabled = true, and ndk { abiFilters.addAll(...) }.

Modernized packagingOptions to packaging { jniLibs { ... } resources { ... } }.

Ensured AndroidManifest.xml includes all necessary permissions (Internet, Location, Bluetooth, Camera, Storage, USB) and the com.dji.sdk.API_KEY declaration.

Created MyApplication.kt for early SDK initialization (DJISDKManager.getInstance().init(this) in attachBaseContext).

MainActivity.kt uses the latest V5 API syntax for SDKManagerCallback and ProductManager.ProductListener (e.g., productId: Int parameters, ProductManager.getInstance().aircraft access, correct LogUtils usage).

All code (Kotlin, XML, Gradle) is syntactically correct according to respective language rules and Android Studio's linter (ignoring only warnings).

Maven Repository Attempts (in settings.gradle.kts - pluginManagement and dependencyResolutionManagement):

Used standard google() and mavenCentral().

Added maven { url = uri("https://developer.dji.com/maven2") } (as per DJI tutorial context).

Tried maven { url = uri("https://arsenal.dji.com/repo/") } (confirmed inaccessible).

Tried maven { url = uri("https://dji-tech.github.io/Mobile-SDK-Android") } (confirmed inaccessible).

Result: All attempts to use custom DJI Maven repositories eventually proved either inaccessible or incomplete for V5.15.0 dependencies.

Dependency Verification & Download Attempts (from com.dji group):

Confirmed com.dji:dji-sdk-v5-aircraft:5.15.0 is listed on Maven Central (https://repo1.maven.org/maven2/com/dji/dji-sdk-v5-aircraft/5.15.0/).

Confirmed dji-sdk-v5-aircraft-5.15.0.aar's pom.xml is viewable and the .aar file is downloadable from Maven Central.

Confirmed com.dji:dji-sdk-v5-networkImp:5.15.0 is also listed and downloadable from Maven Central.

CRITICAL FINDING: com.dji:dji-sdk-v5-core:5.15.0 (which is highly likely to contain the missing core classes) is NOT listed on Maven Central's com/dji/ group.

com.dji:dji-sdk-v5-all:5.15.0 is NOT available on Maven Central (latest is 5.2.0).

DJI's GitHub

README for V5 does not list dji-sdk-v5-core as a separate dependency.

Result: The necessary core modules (dji-sdk-v5-core and potentially others) that provide basic SDK functionalities (dji.v5.manager., dji.v5.utils.common.) are simply not available via public Maven.

Manual AAR File Search & Local Import Attempt:

Downloaded Mobile-SDK-Android-V5-5.15.0.zip from DJI's official GitHub repository (https://github.com/dji-sdk/Mobile-SDK-Android-V5).

Confirmed this ZIP package

does NOT contain any pre-built .aar library files; it's a source code/documentation/sample package.

Result: Cannot obtain dji-sdk-v5-core.aar (or equivalent) for local AAR import.

Environment & Cache:

Multiple Build > Clean Project, Build > Rebuild Project.

Multiple File > Invalidate Caches / Restart.

Manual deletion of ~/.gradle/caches folder.

Confirmed general internet connectivity.

Current Status & Conclusion:

My project is currently blocked from compiling because Gradle cannot resolve fundamental DJI Mobile SDK V5.15.0 dependencies. The problem is not with my code's syntax or my Gradle configuration (which meticulously follows DJI's tutorials and best practices).

The core issue is the unavailability of essential DJI SDK V5.15.0 .aar files (like dji-sdk-v5-core.aar) through any standard, publicly accessible distribution channel (Maven Central, other DJI Maven repos, official SDK ZIP download, or buildable source from provided samples). This indicates a significant distribution gap or change from DJI's side for this specific SDK version.

Representative Error:

e: file:///C:/Users/NAME/AndroidStudioProjects/testapp/app/src/main/java/com/example/testapp/MyApplication.kt:6:17: Unresolved reference: sdk
(Similar "Unresolved reference" errors appear for manager, products, Aircraft, DJISDKManager, ProductManager, LogUtils, IDJIError throughout MyApplication.kt and MainActivity.kt.)

Request for Help:

Could anyone provide definitive guidance on how to acquire all necessary DJI Mobile SDK V5.15.0 .aar files, or the correct Maven repository setup that actually resolves all direct and transitive dependencies (including core modules like dji-sdk-v5-core)? Without these, compilation remains blocked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions