Search code examples
androidsmali

Smali multidex "has already been interned"


I am trying to rebuild a multidex (classes2.dex), however I get the following smali errors:

shazaam.apk.dex2.smali\com\facebook\AdAction.smali[57,9] Class Lcom/facebook/ads/internal/action/AdAction; has already been interned
shazaam.apk.dex2.smali\com\facebook\AdActionFactory.smali[5,67] Class Lcom/facebook/ads/internal/action/AdActionFactory; has already been interned
shazaam.apk.dex2.smali\com\facebook\ads\Ad.smali[10,15] Class Lcom/facebook/ads/Ad; has already been interned

It looks like that each class has a private static field:

.class public Lcom/mopub/mobileads/factories/CustomEventBannerFactory;
.super Ljava/lang/Object;
.source "SourceFile"
.field private static a:Lcom/mopub/mobileads/factories/CustomEventBannerFactory;

What does the error really mean?


Solution

  • This likely means that you have more than one .smali file for each of the mentioned classes.

    If this is not the case, then this is likely a bug in smali - which can be reported at https://github.com/JesusFreke/smali/issues