Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version 1.2.0 on Maven Central shouldn't require Java 11 #28

Closed
ahmedre opened this issue Feb 28, 2021 · 3 comments · Fixed by #30
Closed

version 1.2.0 on Maven Central shouldn't require Java 11 #28

ahmedre opened this issue Feb 28, 2021 · 3 comments · Fixed by #30
Assignees

Comments

@ahmedre
Copy link
Collaborator

ahmedre commented Feb 28, 2021

a bit too late to fix this now for 1.2.0 itself, but should fix this in 1.2.1 to make sure it requires java 8 and above instead of java 11 and above (though it's not an unreasonable stretch given that the latest Canary Android Studio requires Java 11 for builds anyhow and anyone working on a server or desktop environment shouldn't use such old versions of Java anyway).

mobile/prayertimes/core/PrayerTimesFinderKt.java:9: error: cannot access Prayer
    private static final mobile.prayertimes.core.Prayer toPrayer(com.batoulapps.adhan.Prayer $this$toPrayer) {
                                                                                                ^
  bad class file: /root/.gradle/caches/transforms-3/19b789d3a98be555dc1399d0c9ec80ba/transformed/jetified-adhan-1.2.0.jar(com/batoulapps/adhan/Prayer.class)
    class file has wrong version 55.0, should be 52.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.

two workarounds for people hitting this in the meanwhile:

  1. recommended approach - update to Java 11 or above.
  2. alternative approach - use the version on jcenter (exact same, but shouldn't have this problem) - this solution will only work until jcenter goes down next year. you can use the jcenter version by doing:
maven {
    url "https://dl.bintray.com/batoulapps/adhan"		
 }
@ahmedre ahmedre self-assigned this Feb 28, 2021
@freehussain
Copy link

hello,

i have the same issue here, the second workaround doesn't work, but how to update to java 11

@ahmedre
Copy link
Collaborator Author

ahmedre commented Mar 2, 2021

for the second workaround, try it again (adding those 3 lines in your main build.gradle, and then do a ./gradlew --refresh-dependencies.

for the first one, just install java 11 on your machine and set it as the default jdk and build with it.

ahmedre added a commit that referenced this issue Mar 6, 2021
@ahmedre
Copy link
Collaborator Author

ahmedre commented Mar 6, 2021

i pushed 1.2.1 that should fix this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants