CanHub / Android-Image-Cropper

Image Cropping Library for Android, optimised for Camera / Gallery.
Apache License 2.0
1.21k stars 249 forks source link

[FEAT] - Compile project for JAVA 8, besides JAVA 11 #260

Closed saish123 closed 2 years ago

saish123 commented 2 years ago

🚨🚨 Before open the ticket please check if you can reproduce the bug in the sample code

Describe the bug Application apk is not getting generated in Microsoft App center, and getting following error bad class file: /Users/runner/.gradle/caches/transforms-2/files-2.1/31ba530e7fa3634b9e0eaf87be795650/jetified-Android-Image-Cropper-3.3.5-api.jar(com/canhub/cropper/CropImageView.class) class file has wrong version 55.0, should be 52.0

To Reproduce

Expected behavior Can we get a version of library that is complied in java 8.

Canato commented 2 years ago

Hey @saish123 Thanks for raising this!

We update to Java 11 so it could run on the latest gradle and Android Studio. I expect the projects will need to update for the latest gradle and Android Studio anyway soon.

Not sure how to make the project run on both environment Java8 and Java11, since Java11 is the latest suggested and support by Google I do not wanna loose it, but I'm open to have both.

Please open a PR with the needed changes following our contributing guide that I can approve =D

Canato commented 2 years ago

Change from bug to feature cause is working as intent, the request is to make supportive for other versions.

Canato commented 2 years ago

Was thinking about this, until someone do some change you probably can use the version 3.2.2

saish123 commented 2 years ago

Yes @Canato Sorry for the delay in posting, I have gone through the Library versions and Yes I have updated the library version from latest to 3.2.2 and in the next version you have added support for Android 12 and the library is compiled with Java 11.

Thank you for your prompt response. It was very helpful,It would be good if older projects use library version 3.2.2 which are compiled with Java 8 as mentatining two variants of library won't be beneficial to all as it would be user specific. If at any point we have any future issue found in library version 3.2.2 like Android 12 specific then we can copy a library which would be java 8 compiled to support older projects.