Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

616
Visualizações
"Unable to find method ''void org.apache.commons.compress.archivers.zip.ZipFile.<init>(java.nio.channels.SeekableByteChannel)''"

The problem: I'm currently using Android Studio and Gradle to compile code from a github repository (00-Evan/shattered-pixel-dungeon) and while I can run some tasks (tried 'desktop:release', 'desktop:debug'), gradle refuses to sync properly and every time I try to do it, an error log pops up:

FAILURE: Build failed with an exception.

* What went wrong:
'void org.apache.commons.compress.archivers.zip.ZipFile.<init>(java.nio.channels.SeekableByteChannel)'

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
java.lang.NoSuchMethodError: 'void org.apache.commons.compress.archivers.zip.ZipFile.<init>(java.nio.channels.SeekableByteChannel)'
    at com.android.repository.util.InstallerUtil.unzip(InstallerUtil.java:99)

Important: I've had this issue before (while compiling previous version of this code) and back then downloading a specific version of SDK build tools (30.0.0 and 26.0.0 if I recall correctly) helped, however this doesn't help anymore.
Other people using this code don't report the same issue and I seem to be the only one.

Also for some reason android tasks also don't seem to work, as if the android studio didn't recognize them:

Task 'release' not found in project ':android'.

 * Try:
Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

What I've tried:

  • Clearing cache and restarting Android Studio/my PC
  • Enabling/disabling different build tools versions (see the "Important" section). At the moment I have tried enabling all 30.0.X and 26.0.X versions and disabling any newer versions that were enabled
  • Browsed similar Stackoverflow threads, however they either didn't seem to apply to my situation or didn't include enough information. Link, link and link.
  • Uninstalling Android Studio and re-downloading it from scratch.

Additional info:

  • Android Studio version: Android Studio Arctic Fox | 2020.3.1 Patch 4 (Currently latest)
  • Gradle version: 7.2 (I tried using 7.1.1, but that didn't solve the issue)
over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

Generally, when you install android studio it will install the latest SDK and latest build tool version which is not compatible with the existing projects.

According to the build.gradle present in 00-Evan/shattered-pixel-dungeon

You should try installing the SDK version 30. And the SDK build tool version: 30.0.X. It should work.

For me, it is working with SDK version 30 and build tool version 30.0.3.

And just make sure you have java version 8 as mentioned in build.gradle.

over 4 years ago · Santiago Trujillo Relatório

0

Try to install Android 11.0 (R) or Android 12.00 (S) on the SDK Platform tab on the Android SDK. That fixed the issue for me

over 4 years ago · Santiago Trujillo Relatório

0

For anyone looking for more information, this specific issue has been covered in Google's issue tracker. In short, the problem stems from mismatched dependency resolution of Apache's commons-compress between robovm-gradle-plugin and Gradle itself. As for Shattered Pixel Dungeon, the fix is present in this commit.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda