facebook / flipper

A desktop debugging platform for mobile developers.
https://fbflipper.com/
MIT License
13.33k stars 953 forks source link

Android: class file has wrong version 61.0, should be 55.0 #5303

Open gentlee opened 10 months ago

gentlee commented 10 months ago

🐛 Bug Report

Got lots of errors "class file has wrong version 61.0, should be 55.0" after upgrading flipper to 0.238.0

cannot access AndroidFlipperClient
import com.facebook.flipper.android.AndroidFlipperClient;
                                   ^
  bad class file: /Users/main/.gradle/caches/transforms-3/5030298c8b4681a317c403e969798c71/transformed/jetified-flipper-0.212.0-api.jar(/com/facebook/flipper/android/AndroidFlipperClient.class)
    class file has wrong version 61.0, should be 55.0

To Reproduce

  1. Upgrade flipper from 0.182.0 to 0.238.0
  2. Try run the app with (cd android && ./gradlew clean) && react-native run-android

Environment

Flipper desktop: 0.239.0 (latest on the website) "react-native-flipper": "0.212.0" (latest in npm) FLIPPER_VERSION=0.238.0 (latest in central maven) Mac OS 13.6

gentlee commented 10 months ago

Had to update JDK from 11 to 17 to make it build. Should be updated in installation/requirements section of the new flipper, because RN installation guide asks to install 11.

However, now release builds fail.

passy commented 10 months ago

This is coming from an Android Gradle Plugin constraint. You cannot build against the newer target versions without bumping your JDK. So this is less of a Flipper constraint as it is an Android development one.