Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-2863

[Java] Support avro core functionality on Android

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.9.0, 1.9.1, 1.9.2
    • 1.11.0
    • java
    • Android 5.0.2 (API 21) up to the latest Android version, using Android Gradle plugin version 4.0.0.

    Description

      One of our Android apps uses Avro to communicate with the server. Up to vision 1.8.2, it used a subset of the Avro library that was needed to perform this communication. It does not use any of the compress codecs and keeps the use of reflection to a minimum. Since Avro 1.9.0 a few blocking incompatibilities have been introduced. This prevents us from using any of the developments in Avro version 1.9.x, including the updated Jackson dependency.

      org.apache.avro.Schema uses ThreadLocal.withInitial, only available with Android API 26 (Android 8.0)

      org.apache.avro.reflect.ReflectUtils uses Method.invokeExact, not available on Android

      org.apache.avro.reflect.ReflectData uses java.lang.ClassValue, not available on Android

      I've experimented with excluding the org.apache.avro.reflect from the distribution (except MapEntry, which is used elsewhere) and providing my own java.lang.ClassValue implementation. This resolves all build and runtime issues for Android API 26 and above except for ThreadLocal.withInitial, which cannot be circumvented.

      For now the Android app will keep using 1.8.2, but we would prefer to use 1.9.2 or later.

      Attachments

        Activity

          People

            rskraba Ryan Skraba
            blootsvoets Joris Borgdorff
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h
                1h