LoginSignup
2
0

More than 1 year has passed since last update.

ArcticFox(AGP7.0)マイグレーション時にCircleCIで発生する java.lang.NoSuchMethodError: 'void org.apache.commons.compress.archivers.zip.ZipFile.<init>(java.nio.channels.SeekableByteChannel)' について

Posted at

CircleCIから提供されているAndroidのDockerイメージを使用している場合、使われるbuildToolsVersionの一覧がdockerfilesに書かれているみたいです。

例えば api-30を使う場合、👇

RUN sdkmanager \
  "build-tools;27.0.0" \
  "build-tools;27.0.1" \
  "build-tools;27.0.2" \
  "build-tools;27.0.3" \
  # 28.0.0 is failing to download from Google for some reason
  #"build-tools;28.0.0" \
  "build-tools;28.0.1" \
  "build-tools;28.0.2" \
  "build-tools;28.0.3" \
  "build-tools;29.0.0" \
  "build-tools;29.0.1" \
  "build-tools;29.0.2" \
  "build-tools;29.0.3" \
  "build-tools;30.0.0" \
  "build-tools;30.0.1" \
  "build-tools;30.0.2"

30.0.2までしかないみたいです👀

ただ、ローカル環境でcompileSdk30に設定していて、buildToolsVersionを指定していない、もしくは最新である30.0.3を指定している場合は、今回のタイトルにもあるようなエラーが出てしまいそうです。

What went wrong: Could not determine the dependencies of task ':app:mergeDebugAssets'. > Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
> Could not create task ':app:minifyReleaseWithR8'.
> 'void org.apache.commons.compress.archivers.zip.ZipFile.(java.nio.channels.SeekableByteChannel)'

一見buildToolsVersion周りとは関連がなさそうなエラー内容なのでハマりました。。

対応としては、下記の方のDockerfileから作られるDockerイメージを参照していくのがいいかもです

30.0.3が追加されたコミット

とりあえずこちらのdigestの最新版を入れたら動きました!
https://hub.docker.com/r/circleci/android/tags?page=2&ordering=last_updated

circleci/android@sha256:9810ea004180253c2bc75e67c9c8bff85e3da2da3bcf45d976e4906ad99c7d05

これでJetpack Composeが進められる!🎉
Happy Composing!

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0