You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This package as-is when imported in the Java SDK cannot be used subsequently in an Android project without increasing the minApiVersion to 26 which cuts off about 63% of the market according to https://developer.android.com/about/dashboards
This is because the regular protobuf-java package is not built for Android and uses intrinsics that are too new:
> Transform artifact protobuf-java.jar (com.google.protobuf:protobuf-java:3.10.0) with DexingNoClasspathTransform
AGPBI: {"kind":"error","text":"MethodHandle.invoke and MethodHandle.invokeExact are only supported starting with Android O (--min-api 26)","sources":[{}],"tool":"D8"}
We can switch this out with profiles and tag the Android configuration with a android classifier, then build and deploy both the full Java version with no classifier and a lightweight Android version with the android classifier:
This package as-is when imported in the Java SDK cannot be used subsequently in an Android project without increasing the
minApiVersion
to 26 which cuts off about 63% of the market according to https://developer.android.com/about/dashboardsThis is because the regular
protobuf-java
package is not built for Android and uses intrinsics that are too new:The official recommendation is to use
protobuf-lite
which is a separate package with differently named classes and a differentprotoc
invocation: https://github.com/protocolbuffers/protobuf/blob/master/java/lite.mdWe can switch this out with profiles and tag the Android configuration with a
android
classifier, then build and deploy both the full Java version with no classifier and a lightweight Android version with theandroid
classifier:(We can then use the same approach to switch which version of the
hedera-protobuf
package we use in the Java SDK.)The text was updated successfully, but these errors were encountered: