microsoftgraph / msgraph-beta-sdk-java

Microsoft Graph Beta Java SDK
https://docs.microsoft.com/en-us/graph/sdks/use-beta?tabs=Java
MIT License
23 stars 7 forks source link

Android Gradle build failed with Zip64NotSupportedException #976

Open vheneraliuk opened 1 month ago

vheneraliuk commented 1 month ago

Expected behavior

Successful Android app build with msgraph-beta-sdk-java dependency

Actual behavior

When we try to build an Android App with msgraph-beta-sdk-java dependency we got Zip64NotSupportedException:

Caused by: com.android.tools.build.apkzlib.zip.compress.Zip64NotSupportedException: Zip64 EOCD locator found but Zip64 format is not supported: /Users/user/.gradle/caches/8.8/transforms/9fd679e3e134568b95e9ec02cc0912f4/transformed/jetified-microsoft-graph-beta-6.13.0.jar
    at com.android.builder.files.ZipCentralDirectory.readCentralDirectoryRecord(ZipCentralDirectory.kt:145)
    at com.android.builder.files.ZipCentralDirectory.initBuffer(ZipCentralDirectory.kt:76)
    at com.android.builder.files.ZipCentralDirectory.access$initBuffer(ZipCentralDirectory.kt:38)
    at com.android.builder.files.ZipCentralDirectory$directoryBuffer$2.invoke(ZipCentralDirectory.kt:47)
    at com.android.builder.files.ZipCentralDirectory$directoryBuffer$2.invoke(ZipCentralDirectory.kt:47)
    at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
    at com.android.builder.files.ZipCentralDirectory.getDirectoryBuffer(ZipCentralDirectory.kt:47)
    at com.android.builder.files.ZipCentralDirectory.readZipEntries(ZipCentralDirectory.kt:210)
    at com.android.builder.files.ZipCentralDirectory.access$readZipEntries(ZipCentralDirectory.kt:38)
    at com.android.builder.files.ZipCentralDirectory$entries$2.invoke(ZipCentralDirectory.kt:45)
    at com.android.builder.files.ZipCentralDirectory$entries$2.invoke(ZipCentralDirectory.kt:45)
    at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
    at com.android.builder.files.ZipCentralDirectory.getEntries(ZipCentralDirectory.kt:45)
    at com.android.builder.files.RelativeFiles.fromZip(RelativeFiles.java:112)
    at com.android.builder.merge.LazyIncrementalFileMergerInputs.load(LazyIncrementalFileMergerInputs.java:90)
    ... 40 more

Gradle Android Plugin version: 8.4.1 Gradle version: 8.8

Steps to reproduce the behavior

  1. Add msgraph-beta-sdk-java dependency to Android app project
  2. Use SDK in Android app source code
  3. Build Android App

Trying to build with and without Proguard enabled but got the same error

P.S. It looks like this issue is related to the beta Java SDK. Can successfully build Android App with msgraph-sdk-java dependency.

Ndiritu commented 1 month ago

Thanks for reporting this @vheneraliuk.

Just to be clear on your build attempts with Proguard disabled, do you disable your ProGuard files as well as set minifyEnabled and shrinkResources to false ? Does this still throw the exception?

vheneraliuk commented 1 month ago

Thanks for reporting this @vheneraliuk.

Just to be clear on your build attempts with Proguard disabled, do you disable your ProGuard files as well as set minifyEnabled and shrinkResources to false ? Does this still throw the exception?

Yes, I can confirm I'm getting the same exception with minifyEnabled and shrinkResources both set to false

Ndiritu commented 1 month ago

(Triage notes)