Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

颜色切换报错 #461

Open
lixiongh-hou opened this issue Oct 13, 2021 · 3 comments
Open

颜色切换报错 #461

lixiongh-hou opened this issue Oct 13, 2021 · 3 comments

Comments

@lixiongh-hou
Copy link

作者你好,在我切换颜色时候出现了这个错误
E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #2 Process: com.viva.pokemon, PID: 23253 java.lang.RuntimeException: An error occurred while executing doInBackground() at android.os.AsyncTask$4.done(AsyncTask.java:399) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383) at java.util.concurrent.FutureTask.setException(FutureTask.java:252) at java.util.concurrent.FutureTask.run(FutureTask.java:271) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919) Caused by: java.lang.NoSuchFieldError: No static field abc_text_select_handle_left_mtrl_dark of type I in class Landroidx/appcompat/R$drawable; or its superclasses (declaration of 'androidx.appcompat.R$drawable' appears in /data/app/com.viva.pokemon-i_01VB4aBjve-QdDUTjfKw==/base.apk!classes2.dex) at skin.support.content.res.SkinCompatDrawableManager.<clinit>(SkinCompatDrawableManager.java:108) at skin.support.content.res.SkinCompatDrawableManager.get(SkinCompatDrawableManager.java:60) at skin.support.content.res.SkinCompatVectorResources.clear(SkinCompatVectorResources.java:30) at skin.support.content.res.SkinCompatResources.setupSkin(SkinCompatResources.java:76) at skin.support.load.SkinBuildInLoader.loadSkinInBackground(SkinBuildInLoader.java:14) at skin.support.SkinCompatManager$SkinLoadTask.doInBackground(SkinCompatManager.java:394) at skin.support.SkinCompatManager$SkinLoadTask.doInBackground(SkinCompatManager.java:364)
是那个地方配置错了吗,我使用的是values-night方式,在触发这个代码时候闪退
SkinCompatManager.getInstance().loadSkin("night", SkinCompatManager.SKIN_LOADER_STRATEGY_BUILD_IN)

@tangqing1992
Copy link

大神,出现同样的问题,怎样解决?

@Alembertcn
Copy link

+1

@Clark-caipeiyuan
Copy link

allprojects {

configurations.all {
resolutionStrategy {
force 'androidx.appcompat:appcompat:1.2.0'
}
}
}
project.gradle 里面强制限定appcompat的版本

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants