mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-04 09:45:19 +08:00
Update api-exception documentation
This commit is contained in:
@@ -400,6 +400,29 @@ method {
|
|||||||
|
|
||||||
::: danger loggerE
|
::: danger loggerE
|
||||||
|
|
||||||
|
Can't find this Class in \[**CLASSLOADER**\]: **CONTENT** Generated by YukiHookAPI#ReflectionTool
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
|
**异常原因**
|
||||||
|
|
||||||
|
通过 `ClassLoader.searchClass` 或 `PackageParam.searchClass` 找不到需要查找的 `Class` 对象。
|
||||||
|
|
||||||
|
> 示例如下
|
||||||
|
|
||||||
|
```kotlin
|
||||||
|
customClassLoader?.searchClass {
|
||||||
|
from(...)
|
||||||
|
// ...
|
||||||
|
}.get()
|
||||||
|
```
|
||||||
|
|
||||||
|
**解决方案**
|
||||||
|
|
||||||
|
这是一个安全异常,请检查你设置的条件,使用相关工具查看所在 **Dex** 中的 `Class` 以及字节码对象特征,并再试一次。
|
||||||
|
|
||||||
|
::: danger loggerE
|
||||||
|
|
||||||
Can't find this Method/Constructor/Field in \[**CLASS**\]: **CONTENT** Generated by YukiHookAPI#ReflectionTool
|
Can't find this Method/Constructor/Field in \[**CLASS**\]: **CONTENT** Generated by YukiHookAPI#ReflectionTool
|
||||||
|
|
||||||
:::
|
:::
|
||||||
@@ -815,6 +838,20 @@ Can't find this Class in \[**CLASSLOADER**\]: **CONTENT** Generated by YukiHookA
|
|||||||
|
|
||||||
请检查当前字符串或实体匹配到的 `Class` 是否存在于当前 `ClassLoader`,并再试一次。
|
请检查当前字符串或实体匹配到的 `Class` 是否存在于当前 `ClassLoader`,并再试一次。
|
||||||
|
|
||||||
|
::: danger IllegalStateException
|
||||||
|
|
||||||
|
ClassLoader \[**CLASSLOADER**\] is not a DexClassLoader
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
|
**异常原因**
|
||||||
|
|
||||||
|
使用 `ClassLoader.searchClass` 或 `PackageParam.searchClass` 查找 `Class` 但是当前 `ClassLoader` 并不继承于 `BaseDexClassLoader`。
|
||||||
|
|
||||||
|
**解决方案**
|
||||||
|
|
||||||
|
这种情况基本不存在,除非当前 APP 引用了非 ART 平台的可执行文件 (但是这种情况还是不会存在) 或当前 `ClassLoader` 为空。
|
||||||
|
|
||||||
::: danger IllegalStateException
|
::: danger IllegalStateException
|
||||||
|
|
||||||
Failed to got SystemContext
|
Failed to got SystemContext
|
||||||
@@ -1548,4 +1585,29 @@ context.applyTheme(R.style.Theme_AppCompat).applyTheme(R.style.Theme_AppCompat)
|
|||||||
|
|
||||||
**解决方案**
|
**解决方案**
|
||||||
|
|
||||||
在 `Context` 中只能创建一次 `ModuleContextThemeWrapper`,请检查代码是否有循环调用问题。
|
在 `Context` 中只能创建一次 `ModuleContextThemeWrapper`,请检查代码是否有循环调用问题。
|
||||||
|
|
||||||
|
::: danger IllegalStateException
|
||||||
|
|
||||||
|
Cannot create classes cache for "android", please remove "name" param
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
|
**异常原因**
|
||||||
|
|
||||||
|
在系统框架 (android) 宿主使用了 `DexClassFinder` 的缓存功能 `searchClass(name = ...)`。
|
||||||
|
|
||||||
|
> 示例如下
|
||||||
|
|
||||||
|
```kotlin
|
||||||
|
loadSystem {
|
||||||
|
searchClass(name = "test") {
|
||||||
|
from(...)
|
||||||
|
// ...
|
||||||
|
}.get()
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**解决方案**
|
||||||
|
|
||||||
|
由于缓存会将找到的 `Class` 名称存入 `SharedPreferences`,但是系统框架不存在 data 目录,所以请不要在系统框架中使用此功能。
|
Reference in New Issue
Block a user