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

Cannot use 0.28 with android #3

Closed
enra64 opened this issue Sep 27, 2021 · 4 comments
Closed

Cannot use 0.28 with android #3

enra64 opened this issue Sep 27, 2021 · 4 comments

Comments

@enra64
Copy link

enra64 commented Sep 27, 2021

When including 0.28 in android, we get the following error. It seems that the log-front dependency is using too new calls for API <26 for Android.

   > Failed to transform log-front-2.3.jar (net.pwall.log:log-front:2.3) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-is-debuggable=true, dexing-min-sdk=23, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingWithClasspathTransform: /home/arne/.gradle/caches/transforms-3/45fe60c99964aab24d2889666a5b2b26/transformed/jetified-log-front-2.3.jar.
         > Error while dexing.
ERROR:/home/arne/.gradle/caches/transforms-3/45fe60c99964aab24d2889666a5b2b26/transformed/jetified-log-front-2.3.jar: D8: com.android.tools.r8.internal.m1: MethodHandle.invoke and MethodHandle.invokeExact are only supported starting with Android O (--min-api 26)
@pwall567
Copy link
Owner

That's very unfortunate. Thanks for pointing this out - the JavaDoc comments say that MethodHandle has been part of Java since 1.7, which was released in 2011!

I was hoping to reduce the overhead of reflection-based calls to the underlying logging mechanism, but the performance improvement would have been very slight in any case.

I'll revert the changes in log-front and build a new version of json-kotlin-schema with the updated library.

Expect a new release in a few days - sorry you've been inconvenienced by this.

@enra64
Copy link
Author

enra64 commented Sep 28, 2021 via email

@pwall567
Copy link
Owner

OK, I've reverted the changes to log-front so that it no longer uses MethodHandle, and built a new version of json-kotlin-schema - version 0.29 - with the new library.

I hope Android is happy with this version - let me know if you have any problems.

@pwall567
Copy link
Owner

I am going to close this issue on the assumption that the new version solves the problem.

Feel free to open a new issue if if you have any further problems.

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

No branches or pull requests

2 participants