Help us understand the problem. What is going on with this article?

ButterKnife をアップデート後、ビルド時に ZipException が出た時の対応

More than 3 years have passed since last update.

発生状況

  • ButterKnife 7 -> 8.8.1 に変更
  • KotterKnife 0.1.0-SNAPSHOT
error
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: 
duplicate entry: butterknife/BuildConfig.class

原因

  • ButterKnifeKotterKnife のpackage名が重複し、その結果BuildConfigが重複したことによるエラー
    • ※ButterKnife 7系はBuildConfigを生成しないためエラーが発生していなかった

対応

  • 修正PRはすでに master にマージされているため、該当PRマージ時のコミット番号を指定して取得する。
    • 先駆者に感謝😀
    • Github から ソースを取得するために JitPack.io を利用します。
    • master を指定でも良いですが、よく分からない修正が入るのは怖いため、コミット番号指定がオススメです
repositories {
    maven { url "https://jitpack.io"; }
}
dependencies {
    compile 'com.github.JakeWharton:kotterknife:11748c0b1e16fd66f75b381e5266c9ec99f67dab'
}
charcoJP
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした