diff --git a/dexpreopt/class_loader_context.go b/dexpreopt/class_loader_context.go index f76a205aa..57b4c4f3f 100644 --- a/dexpreopt/class_loader_context.go +++ b/dexpreopt/class_loader_context.go @@ -257,6 +257,9 @@ const AnySdkVersion int = android.FutureApiLevelInt func (clcMap ClassLoaderContextMap) addContext(ctx android.ModuleInstallPathContext, sdkVer int, lib string, hostPath, installPath android.Path, nestedClcMap ClassLoaderContextMap) error { + // For prebuilts, library should have the same name as the source module. + lib = android.RemoveOptionalPrebuiltPrefix(lib) + devicePath := UnknownInstallLibraryPath if installPath == nil { if android.InList(lib, CompatUsesLibs) || android.InList(lib, OptionalCompatUsesLibs) {