Run gradlew failure due to two confusing errors

Hello! This is my first post so I’ll try to make sure the format is good but if I need to edit I will to make it more clear and helpful.
I am building my first react-native app with expo. I am still learning about gradle but as of now my app is almost complete, so I have ran this command

eas build:configure which works
then
eas build --platform all

eas build --platform all fails and describes the error in my run gradlew as such (2 errors)

1: Task failed with an exception.
* Where:
Build file '/home/expo/workingdir/build/node_modules/expo-ads-admob/android/build.gradle' line: 40
* What went wrong:
A problem occurred evaluating project ':expo-ads-admob'.
> Could not set unknown property 'classifier' for task ':expo-ads-admob:androidSourcesJar' of type org.gradle.api.tasks.bundling.Jar.

AND

2: Task failed with an exception.
* Where:
Script '/home/expo/workingdir/build/node_modules/expo-modules-core/android/ExpoModulesCorePlugin.gradle' line: 85
* What went wrong:
A problem occurred configuring project ':expo'.

Could not get unknown property 'release' for SoftwareComponent container of type org.gradle.api.internal.component.DefaultSoftwareComponentContainer.

I am trying to understand these errors with research but I am afraid I have some gaps in my knowledge about causes of these that are leading me down unproductive paths. If anyone could steer me in the right direction to troubleshoot errors like this as well as these specific errors I would so apprecieate it! :slight_smile:

If I need to provide any gradle files please let me know. I don’t want to add more than necessary.

Both errors mean that either your dependencies are too old (expo-ads-admob and expo-modules-core), or your other versions are too new.

The first error means expo-ads-admob is only compatible with an older Gradle version where that property existed but is now replaced by archiveClassifier.

The second error means expo-modules-core has a similar problem, iirc then here the problem is that it is for an older Android Gradle Plugin version

Sorry for the delayed response, that absolutely fixed my issue, thank you so much! :slightly_smiling_face:

1 Like