Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Cannot transfer object from class android.content.res.MiuiTypedArray to class android.content.res.XResources$XTypedArray #27

Closed
@gitpc988

Description

@gitpc988

12-02 15:05:58.505: I/Xposed(7247): java.lang.IllegalArgumentException: Cannot transfer object from class android.content.res.MiuiTypedArray to class android.content.res.XResources$XTypedArray
12-02 15:05:58.505: I/Xposed(7247): at de.robv.android.xposed.XposedBridge.setObjectClass(XposedBridge.java:773)
12-02 15:05:58.505: I/Xposed(7247): at de.robv.android.xposed.XposedBridge.access$6(XposedBridge.java:759)
12-02 15:05:58.505: I/Xposed(7247): at de.robv.android.xposed.XposedBridge$7.afterHookedMethod(XposedBridge.java:358)
12-02 15:05:58.505: I/Xposed(7247): at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:645)
12-02 15:05:58.505: I/Xposed(7247): at android.content.res.TypedArray.(Native Method)
12-02 15:05:58.505: I/Xposed(7247): at android.content.res.MiuiTypedArray.(MiuiTypedArray.java:13)
12-02 15:05:58.505: I/Xposed(7247): at android.content.res.Resources.getCachedStyledAttributes(Resources.java:2223)
12-02 15:05:58.505: I/Xposed(7247): at android.content.res.Resources.access$000(Resources.java:74)
12-02 15:05:58.505: I/Xposed(7247): at android.content.res.Resources$Theme.obtainStyledAttributes(Resources.java:1282)
12-02 15:05:58.505: I/Xposed(7247): at android.content.Context.obtainStyledAttributes(Context.java:362)
12-02 15:05:58.505: I/Xposed(7247): at android.view.ViewGroup$Injector.initTagChildSequenceState(ViewGroup.java:108)
12-02 15:05:58.505: I/Xposed(7247): at android.view.ViewGroup.initFromAttributes(ViewGroup.java:614)
12-02 15:05:58.505: I/Xposed(7247): at android.view.ViewGroup.(ViewGroup.java:536)
12-02 15:05:58.505: I/Xposed(7247): at android.widget.LinearLayout.(LinearLayout.java:176)
12-02 15:05:58.505: I/Xposed(7247): at android.widget.LinearLayout.(LinearLayout.java:172)
12-02 15:05:58.505: I/Xposed(7247): at com.android.internal.view.menu.ActionMenuView.(ActionMenuView.java:75)
12-02 15:05:58.505: I/Xposed(7247): at java.lang.reflect.Constructor.constructNative(Native Method)
12-02 15:05:58.505: I/Xposed(7247): at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
12-02 15:05:58.505: I/Xposed(7247): at android.view.LayoutInflater.createView(LayoutInflater.java:657)
12-02 15:05:58.505: I/Xposed(7247): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:757)
12-02 15:05:58.505: I/Xposed(7247): at android.view.LayoutInflater.inflate(LayoutInflater.java:536)
12-02 15:05:58.505: I/Xposed(7247): at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)
12-02 15:05:58.505: I/Xposed(7247): at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:631)
12-02 15:05:58.505: I/Xposed(7247): at android.view.LayoutInflater.inflate(Native Method)
12-02 15:05:58.505: I/Xposed(7247): at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
12-02 15:05:58.505: I/Xposed(7247): at com.android.internal.view.menu.BaseMenuPresenter.getMenuView(BaseMenuPresenter.java:70)
12-02 15:05:58.505: I/Xposed(7247): at com.android.internal.view.menu.ActionMenuPresenter.getMenuView(ActionMenuPresenter.java:150)
12-02 15:05:58.505: I/Xposed(7247): at com.android.internal.widget.ActionBarView.setMenu(ActionBarView.java:466)
12-02 15:05:58.505: I/Xposed(7247): at com.android.internal.policy.impl.PhoneWindow.preparePanel(PhoneWindow.java:457)
12-02 15:05:58.505: I/Xposed(7247): at com.android.internal.policy.impl.PhoneWindow.invalidatePanelMenu(PhoneWindow.java:833)
12-02 15:05:58.505: I/Xposed(7247): at com.android.internal.policy.impl.PhoneWindow.restorePanelState(PhoneWindow.java:1768)
12-02 15:05:58.505: I/Xposed(7247): at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:1718)
12-02 15:05:58.505: I/Xposed(7247): at android.app.Activity.onRestoreInstanceState(Activity.java:999)
12-02 15:05:58.505: I/Xposed(7247): at android.app.Activity.performRestoreInstanceState(Activity.java:971)
12-02 15:05:58.505: I/Xposed(7247): at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1130)
12-02 15:05:58.505: I/Xposed(7247): at com.lbe.security.service.core.client.b.x.callActivityOnRestoreInstanceState(Unknown Source)
12-02 15:05:58.505: I/Xposed(7247): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
12-02 15:05:58.505: I/Xposed(7247): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2106)
12-02 15:05:58.505: I/Xposed(7247): at android.app.ActivityThread.access$600(ActivityThread.java:137)
12-02 15:05:58.505: I/Xposed(7247): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1202)
12-02 15:05:58.505: I/Xposed(7247): at android.os.Handler.dispatchMessage(Handler.java:99)
12-02 15:05:58.505: I/Xposed(7247): at android.os.Looper.loop(Looper.java:137)
12-02 15:05:58.505: I/Xposed(7247): at android.app.ActivityThread.main(ActivityThread.java:4819)
12-02 15:05:58.505: I/Xposed(7247): at java.lang.reflect.Method.invokeNative(Native Method)
12-02 15:05:58.505: I/Xposed(7247): at java.lang.reflect.Method.invoke(Method.java:511)
12-02 15:05:58.505: I/Xposed(7247): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
12-02 15:05:58.505: I/Xposed(7247): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
12-02 15:05:58.505: I/Xposed(7247): at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
12-02 15:05:58.505: I/Xposed(7247): at dalvik.system.NativeStart.main(Native Method)

Activity

manvir-singh

manvir-singh commented on Dec 2, 2014

@manvir-singh

Got some code?

manvir-singh

manvir-singh commented on Dec 2, 2014

@manvir-singh

Form what i can see your give the wrong arguments to something. but post the code and ill fix it for you if i can

gitpc988

gitpc988 commented on Dec 2, 2014

@gitpc988
Author

Thanks for you reply.I'm not make code in project,just config AndroidManifest.xml file.



Then,I build to my phone,in logcat found those error. I think is phones problem.My phone's rom is MIUI.

manvir-singh

manvir-singh commented on Dec 2, 2014

@manvir-singh

Its the rom then

manvir-singh

manvir-singh commented on Dec 2, 2014

@manvir-singh

What i usually do is dev on a vanilla aosp rom and then test on other roms and what not. Probably not a bad idea for you to do that too.

manvir-singh

manvir-singh commented on Dec 2, 2014

@manvir-singh

it may help if you try Disable resources API thats a temp fix if it works

changed the title [-]I build project to miui get this problem, the XposedBridgeApi version is 54[/-] [+]Cannot transfer object from class android.content.res.MiuiTypedArray to class android.content.res.XResources$XTypedArray[/+] on Dec 2, 2014
rovo89

rovo89 commented on Dec 2, 2014

@rovo89
Owner

It indeed seems like the MIUI version you're using has another incompatible change, compared to AOSP. Just for reference, which ROM is this?

Their changes are usually pretty hard to work around and they have been rather disrespectful towards the Xposed project in the past, so this is somewhere between "won't fix" and lowest priority for me.

Workarounds: Disable the resources API in the Xposed Installer settings, or use a different ROM.

gitpc988

gitpc988 commented on Dec 2, 2014

@gitpc988
Author

Thank you very much.
My rom versions is MIUI-4.8.29 . MI 1S phone. Android 4.1.2 JZO54K
I found in the source code support miui.could you tell me you test success was what version? I will try you advice. Thank you all of you again.

rovo89

rovo89 commented on Dec 2, 2014

@rovo89
Owner

Actually I have no idea in which ROM versions that MiuiResources class is used.

gitpc988

gitpc988 commented on Dec 2, 2014

@gitpc988
Author

I Disable resource API. The problem solved. Thank you.. hhhhh

theknut

theknut commented on Dec 2, 2014

@theknut

Keep in mind that disabling the resources API is a bad workarond. If the
module doesn't do resource hooks in a separate class the whole module will
not be loaded in initZygote. Rather switch ROMs, here is why you don't want
to use MIUI:
http://forum.xda-developers.com/showpost.php?p=52291098&postcount=6

2014-12-02 9:24 GMT+01:00 plllp notifications@github.com:

Closed #27 #27.


Reply to this email directly or view it on GitHub
#27 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @rovo89@manvir-singh@gitpc988@theknut

        Issue actions

          Cannot transfer object from class android.content.res.MiuiTypedArray to class android.content.res.XResources$XTypedArray · Issue #27 · rovo89/XposedBridge