使用 IndoorAtlas 库的 transformClassesWithDexForDebug

transformClassesWithDexForDebug using IndoorAtlas Library

我尝试使用 IndoorAtlas Android SDK 示例。我遵循 this 指南。

但是当我尝试 运行 时,我得到了这个错误:

Error:Uncaught translation error: com.android.dx.cf.code.SimException: local variable type mismatch: attempt to set or access a value of type java.lang.Object[] using a local variable of type com.indooratlas.android.sdk.IAGeofenceRequest. This is symptomatic of .class transformation tools that ignore local variable information.

Error:1 error; aborting

Error:Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: Unable to pre-dex '/Users/xxx/AndroidStudioProjects/IndoorLocalization/app/libs/indooratlas-android-sdk-2.5.1.jar' to '/Users/xxx/AndroidStudioProjects/IndoorLocalization/app/build/intermediates/transforms/dex/debug/folders/1000/10/indooratlas-android-sdk-2.5.1_dbe918a8d06cf55c975257e4802cd6d4f4f48ea4'

我该如何解决这个问题?

IndoorAtlas Android SDK 2.5.1 有一个 proguard 优化错误。使用较新的 2.5.2 版本已修复此错误。指定

即可使用2.5.2版本
dependencies {
    ...
    compile 'com.indooratlas.android:indooratlas-android-sdk:2.5.2'
    ...
}

在您的应用程序 build.gradle 文件中。