while building apk getting error

while use set EAS_NO_VCS=1 && eas build --profile preview --platform android we are getting this error

WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.

62[stderr]

FAILURE: Build completed with 2 failures.

63[stderr]

1: Task failed with an exception.

64[stderr]

-----------

65[stderr]

* Where:

66[stderr]

Build file '/home/expo/workingdir/build/node_modules/expo-localization/android/build.gradle' line: 13

67[stderr]

* What went wrong:

68[stderr]

A problem occurred evaluating project ':expo-localization'.

69[stderr]

> Plugin with id 'maven' not found.

70[stderr]

* Try:

71[stderr]

> Run with --stacktrace

72[stderr]

option to get the stack trace.

73[stderr]

> Run with --info or --debug option to get more log output.

74[stderr]

> Run with --scan to get full insights.

75[stderr]

==============================================================================

76[stderr]

2: Task failed with an exception.

77[stderr]

-----------

78[stderr]

* What went wrong:

79[stderr]

A problem occurred configuring project ':expo'.

80[stderr]

> compileSdkVersion is not specified. Please add it to build.gradle

81[stderr]

* Try:

82[stderr]

> Run with --stacktrace option to get the stack trace.

83[stderr]

> Run with --info or --debug option to get more log output.

84[stderr]

> Run with --scan to get full insights.

85[stderr]

==============================================================================

86[stderr]

* Get more help at https://help.gradle.org

87

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

88

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

89

See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings

90

5 actionable tasks: 5 executed

91[stderr]

BUILD FAILED in 1m 48s

92

Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

Hi @satyam.ypo, can you share your link to your EAS Build where you are getting this error?

Thanks for sharing the link to the build. It seems expo-localization is not installed in your project. If you look into the dependencies in package.json file, you will see there that the module is not installed. This is the reason creating the apk is failing.

but i am not using expo-localization package in this project, i just using expo-device, expo-notifications, expo-application,react, react-native. only i am using

In your code, can you take a look if the library is getting imported or maybe you installed it is in package-lock.json or yarn.lock file? I’d suggest deleting those files, removing node_modules directory, installing dependencies again in your project and then creating another build to if that was the underlying issue.

I have same issue… pls help

WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the gradle.properties file or use the new publishing DSL.

and here’s another 1

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use ‘–warning-mode all’ to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

Hi @rhalfcaacbay

Those are not errors. They are warnings and you can ignore them. If you’re getting an error, please post it. Also, in case one of the Expo team members is able to have a look, please post a link to the failing build.

@rhalfcaacbay Have you been able to find any solutions? I’m having the same issue and am on a tight deadline

plz run the command ‘npm install expo-localization’ in your local system and later build the app it is worked

1 Like

please do see this, I am stuck at build failed for 2 days.

https://forums.expo.dev/t/task-compilereleasejavawithjavac-failed/69927