Giter Site home page Giter Site logo

Comments (8)

shifujun avatar shifujun commented on July 18, 2024

感谢反馈。插件是在单独进程的,这可能是你没看到log的原因。我晚点查这个问题。

from shadow.

shifujun avatar shifujun commented on July 18, 2024

感谢反馈。插件是在单独进程的,这可能是你没看到log的原因。我晚点查这个问题。

from shadow.

shifujun avatar shifujun commented on July 18, 2024

如果你测试使用的是Android 9.0或更高版本系统,应该是下面的原因。否则就是其他我复现不了的问题了。

日志看不到是因为Crash后进程立刻重启了,我们可以在启动插件进程后专门根据pid过滤Log,就能看到插件进程最后几行Log如下:

2019-07-18 19:45:46.882 7267-7267/com.tencent.shadow.sample.host:plugin W/ple.host:plugi: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;-><init>(Landroid/content/Context;I)V (light greylist, reflection)
2019-07-18 19:45:46.884 7267-7267/com.tencent.shadow.sample.host:plugin W/System.err: StrictMode VmPolicy violation with POLICY_DEATH; shutting down.
2019-07-18 19:45:46.884 7267-7267/com.tencent.shadow.sample.host:plugin I/Process: Sending signal. PID: 7267 SIG: 9

所以可以看到,这是因为Sample默认打开了严格检查模式,而WebView的实现调用了灰名单方法。所以,应该是Android系统中自己还有一些实现没有避免使用私有API呢。可以去掉com.tencent.shadow.sample.host.HostApplication#detectNonSdkApiUsageOnAndroidP调用,来继续验证WebView的兼容性。

from shadow.

shifujun avatar shifujun commented on July 18, 2024

我考虑咱们是不是这样改一下?

在宿主程序启动界面加上一个默认为关闭的滑动开关。仅当Android 9.0以上版本显式。开关控制是否调用com.tencent.shadow.sample.host.HostApplication#detectNonSdkApiUsageOnAndroidP方法。

虽然不复杂,但是能不能请你帮Shadow写一下这个功能呢?主要目的在于参与共同建设Shadow的代码。

from shadow.

hsynlove avatar hsynlove commented on July 18, 2024

嗯 我也发现了如果开启严格模式会导致我手机报错,另外对AppCompat包中使用控件,在宿主的Application中设置AppCompat的theme就可以不报错了。

from shadow.

hsynlove avatar hsynlove commented on July 18, 2024

非常感谢!我本地原项目的Shadow化已经基本完成,等测试稳定以后我再提交部分补充。

from shadow.

shifujun avatar shifujun commented on July 18, 2024

另外的问题最好另外提个issue跟进。最好把代码也传上来。

from shadow.

hsynlove avatar hsynlove commented on July 18, 2024

好的,我也是在原项目的改造过程中,逐步摸索、排错。如果发现不是因为我使用问题导致的错误我会提交issue并补充代码的。

from shadow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.