Task :expo:compileReleaseJavaWithJavac FAILED

  1. SDK Version: 41
  2. Platforms(Android/iOS/web/all): Android

I’m trying to build for Android for the first time, but it keeps failing with this error:

> Task :expo:compileReleaseJavaWithJavac FAILED
[stderr] /home/expo/workingdir/build/node_modules/expo/android/build/generated/expo/src/main/java/expo/modules/ExpoModulesPackageList.java:9: error: method asList in class Arrays cannot be applied to given types;
[stderr]     static final List<Package> packagesList = Arrays.<Package>asList(
[stderr]                                                     ^
[stderr]   required: T[]
[stderr]   found: ReactAdapterPackage,AmplitudePackage,ApplicationPackage,ConstantsPackage,BasePackage,CryptoPackage,DevLauncherPackage,ErrorRecoveryPackage,FileSystemPackage,FontLoaderPackage,GLPackage,ImageLoaderPackage,ImageManipulatorPackage,ImagePickerPackage,KeepAwakePackage,MediaLibraryPackage,SplashScreenPackage,UpdatesPackage
[stderr]   reason: varargs mismatch; DevLauncherPackage cannot be converted to Package
[stderr]   where T is a type-variable:
[stderr]     T extends Object declared in method <T>asList(T...)

In my build.gradle I have

ext {
        buildToolsVersion = "29.0.3"
        minSdkVersion = 21
        compileSdkVersion = 30
        targetSdkVersion = 30
dependencies {

and in gradle-wrapper.properties I have


I saw online I should change the versions to 7.0.0 and 7.0.3, but the issue still persists.

I agree that EAS needs to get with the times, we need to bump this up to Gradle 7.2 support. This has been out for a long time. 6.9 is old.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.