Plugin integration
Cannot cast the outer type to a reference type
The Medallia Experience Orchestration Plugin relies on correct Bytecode metadata. Compilers can have bugs that do not provide all the necessary metadata required. Missing metadata will result in the Android Application Bytecode being incomplete.
If an Android application which has the Medallia Experience Orchestration Plugin applied builds successfully, but produces a runtime ClassNotFoundException
, or another related error, check the classFileProcessorLog.log
found in the build directory (defaults to build/orchestration/classFileProcessorLog.log
). If an error containing Whilst processing type 'Lcom/example/type;' - cannot cast the outer type to a reference type.
is found, try ignoring the missing metadata as follows:
- Open the app level
build.gradle
where the Orchestration Plugin has been applied. - If not already present, add the
thunderhead
configuration closure. - If not already present, add the
classProcessing
configuration closure to themxo
closure. - Configure
classProcessing
to ignore missing metadata by invoking theignoreMissingMetadata
method. - Test if the error has been resolved.
Example build.gradle.kts
or build.gradle
:
plugins {
id("com.android.application") version {VERSION}
id("com.medallia.mxo-android-sdk-orchestration-gradle-plugin") version {PLUGIN_VERSION} apply false
}
mxo {
classProcessing {
ignoreMissingMetadata()
}
}
plugins {
id 'com.android.application' version {VERSION}
id 'com.medallia.mxo-android-sdk-orchestration-gradle-plugin' version {PLUGIN_VERSION} apply false
}
mxo {
classProcessing {
ignoreMissingMetadata()
}
}
Resolve Unable to find method ''org.gradle.api.file.ConfigurableFileCollection org.jetbrains.kotlin.gradle.tasks.KotlinCompile.getLibraries()"
If you are getting this error, upgrade to the latest MXO SDK and Plugin versions.