I injected this piece of code invoke-static {p0}, Lcom/outfit7/talkingtomcandyrun/Toast;->show(Landroid/content/Context;)V in a decompiled app.
Like this:
.line 70
move-object/from16 v0, p0
iget-object v0, v0, Lcom/bee7/gamewall/dialogs/BannerNotificationDialog;->sharedPreferencesNotificationsHelper:Lcom/bee7/sdk/common/util/SharedPreferencesNotificationsHelper;
move-object/from16 v21, v0
sget v22, Lcom/bee7/gamewall/BannerNotification;->NUMBER_OF_REWARD_BANNER_NOTIFICATIONS_LAYOUTS:I
invoke-virtual/range {v21 .. v22}, Lcom/bee7/sdk/common/util/SharedPreferencesNotificationsHelper;->getNextRewardNotificationLayout(I)I
.line 76
sget v21, Lcom/bee7/gamewall/R$layout;->gamewall_banner_notification_reward_0:I
move-object/from16 v0, p0
move/from16 v1, v21
invoke-virtual {v0, v1}, Lcom/bee7/gamewall/dialogs/BannerNotificationDialog;->setContentView(I)V
invoke-static {p0}, Lcom/outfit7/talkingtomcandyrun/Toast;->show(Landroid/content/Context;)V
.line 77
const/16 v21, 0x1
move/from16 v0, v21
move-object/from16 v1, p0
iput v0, v1, Lcom/bee7/gamewall/dialogs/BannerNotificationDialog;->numberOfOffersInBannerNotification:I
But when i tried to build it with apktool i rechieve the following message:
com.outfit7.talkingtomcandyrun\smali\com\bee7\gamewall\dialogs\BannerNotificationDialog.smali[179,106] Invalid register: v25. Must be between v0 and v15, inclusive.
Referring to this line: invoke-virtual {v0, v1}, Lcom/bee7/gamewall/dialogs/BannerNotificationDialog;->setContentView(I)V.
Why am i getting this error? I don't even see register v25 in the code.
Edit:
I tried it with some other apps and noticed that the error always adds 1 to the highest register. So if the highest register in the method is v17 it will say Invalid register: v18.