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

依赖android库后,运行报类重复,是库里本身就有重复吗 #64

Open
zzzsssbo opened this issue Nov 25, 2022 · 2 comments

Comments

@zzzsssbo
Copy link

implementation 'com.github.promeg:tinypinyin-lexicons-android-cncity:2.0.3'
就添加了一句这个依赖库,就运行不起来了

Caused by: java.lang.RuntimeException: Duplicate class com.github.promeg.tinypinyin.android.asset.lexicons.AndroidAssetDict found in modules jetified-tinypinyin-android-asset-lexicons-2.0.3-runtime (com.github.promeg.tinypinyin:tinypinyin-android-asset-lexicons:2.0.3) and jetified-tinypinyin-android-asset-lexicons-2.0.3-runtime (com.github.promeg:tinypinyin-android-asset-lexicons:2.0.3)
Duplicate class com.github.promeg.tinypinyin.android.asset.lexicons.BuildConfig found in modules jetified-tinypinyin-android-asset-lexicons-2.0.3-runtime (com.github.promeg.tinypinyin:tinypinyin-android-asset-lexicons:2.0.3) and jetified-tinypinyin-android-asset-lexicons-2.0.3-runtime (com.github.promeg:tinypinyin-android-asset-lexicons:2.0.3)
Duplicate class com.github.promeg.tinypinyin.lexicons.android.cncity.BuildConfig found in modules jetified-tinypinyin-lexicons-android-cncity-2.0.3-runtime (com.github.promeg.tinypinyin:tinypinyin-lexicons-android-cncity:2.0.3) and jetified-tinypinyin-lexicons-android-cncity-2.0.3-runtime (com.github.promeg:tinypinyin-lexicons-android-cncity:2.0.3)
Duplicate class com.github.promeg.tinypinyin.lexicons.android.cncity.CnCityDict found in modules jetified-tinypinyin-lexicons-android-cncity-2.0.3-runtime (com.github.promeg.tinypinyin:tinypinyin-lexicons-android-cncity:2.0.3) and jetified-tinypinyin-lexicons-android-cncity-2.0.3-runtime (com.github.promeg:tinypinyin-lexicons-android-cncity:2.0.3)

@529645354
Copy link

我也遇到同样的问题,怎么解决呢?

@136093330
Copy link

在根目录下的settings.gradle下新增 jcenter()(老版本androidStudio没有settings.gradle, 但也是在跟目录的build.gradle新增)

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

3 participants