Hello!
Im trying to build my app through EAS and it works fine for iOS but for Android it throws an error during prebuild. It works if I build with “expo build:android”. Im using SDK44.
- Creating native project directories (./ios and ./android) and updating .gitignore
✔ Created native project | /android already created | gitignore already synced
- Adding Metro bundler config
- Updating your package.json scripts, dependencies, and main file
✔ Updated package.json and added index.js entry point for iOS and Android
- Config syncing
[stderr]
Using node to generate images. This is much slower than using native packages.
[stderr]
› Optionally you can stop the process and try again after successfully running `npm install -g sharp-cli`.
- Config syncing
✖ Config sync failed
[stderr]
[20:42:44] [android.manifest]: withAndroidManifestBaseMod: Cannot read properties of null (reading 'manifest')
[stderr]
[20:42:44] TypeError: [android.manifest]: withAndroidManifestBaseMod: Cannot read properties of null (reading 'manifest')
[stderr]
at isManifest (/home/expo/eas-build-worker/node_modules/@expo/config-plugins/src/android/Manifest.ts:173:16)
[stderr]
at Object.readAndroidManifestAsync (/home/expo/eas-build-worker/node_modules/@expo/config-plugins/src/android/Manifest.ts:165:8)
[stderr]
at read (/home/expo/eas-build-worker/node_modules/@expo/config-plugins/src/plugins/withAndroidBaseMods.ts:123:16)
[stderr]
at action (/home/expo/eas-build-worker/node_modules/@expo/config-plugins/src/plugins/createBaseMod.ts:80:30)
[stderr]
at interceptingMod (/home/expo/eas-build-worker/node_modules/@expo/config-plugins/src/plugins/withMod.ts:108:21)
[stderr]
at evalModsAsync (/home/expo/eas-build-worker/node_modules/@expo/config-plugins/src/plugins/mod-compiler.ts:172:25)
[stderr]
at compileModsAsync (/home/expo/eas-build-worker/node_modules/@expo/config-plugins/src/plugins/mod-compiler.ts:82:10)
[stderr]
at configureManagedProjectAsync (/home/expo/eas-build-worker/node_modules/expo-cli/src/commands/eject/configureProjectAsync.ts:58:12)
[stderr]
at prebuildAsync (/home/expo/eas-build-worker/node_modules/expo-cli/src/commands/eject/prebuildAppAsync.ts:88:21)
[stderr]
at actionAsync (/home/expo/eas-build-worker/node_modules/expo-cli/src/commands/eject/prebuildAsync.ts:34:3)
bash exited with non-zero code: 1
Is there anyone that has a solution for this?
Thanks!
UPDATE
After removed the android-folder in my project I got a new error.
Running './gradlew :app:bundleRelease' in /home/expo/workingdir/build/android
Downloading https://services.gradle.org/distributions/gradle-7.3.3-all.zip
10
%.
20%.
30%
40%.
50%.
60%.
70%.
80%.
90%.
100%
Welcome to Gradle 7.3.3!
Here are the highlights of this release:
- Easily declare new test suites in Java projects
- Support for Java 17
- Support for Scala 3
For more details see https://docs.gradle.org/7.3.3/release-notes.html
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.3.3/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build
Unable to list file systems to check whether they can be watched. Assuming all file systems can be watched. Reason: Could not query file systems: could not open mount file (errno 2: No such file or directory)
> Task :react-native-gradle-plugin:compileKotlin
'compileJava' task (current target is 1.8) and 'compileKotlin' task (current target is 11) jvm target compatibility should be set to the same Java version.
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt: (10, 37): 'BaseVariant' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt: (119, 30): 'BaseVariant' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt: (135, 26): 'BaseVariant' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt: (155, 32): 'BaseVariant' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt: (161, 31): 'BaseVariant' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt: (169, 36): 'BaseVariant' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactPlugin.kt: (100, 48): 'reactRoot: DirectoryProperty' is deprecated. reactRoot was confusing and has been replace with rootto point to your root project and reactNativeDir to point to the folder of the react-native NPM package
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt: (10, 37): 'ApplicationVariant' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt: (11, 37): 'BaseVariant' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt: (12, 37): 'LibraryVariant' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt: (28, 51): 'BaseVariant' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt: (131, 12): 'ApplicationVariant' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt: (132, 12): 'LibraryVariant' is deprecated. Deprecated in Java
w: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt: (252, 14): 'BaseVariant' is deprecated. Deprecated in Java
> Task :react-native-gradle-plugin:compileJava
[stderr]
Note: /home/expo/workingdir/build/node_modules/react-native-gradle-plugin/src/main/java/com/facebook/react/codegen/generator/SchemaJsonParser.java uses or overrides a deprecated API.
[stderr]
Note: Recompile with -Xlint:deprecation for details.
> Task :react-native-gradle-plugin:pluginDescriptors
> Task :react-native-gradle-plugin:processResources
> Task :react-native-gradle-plugin:classes
> Task :react-native-gradle-plugin:inspectClassesForKotlinIC
> Task :react-native-gradle-plugin:jar
[stderr]
FAILURE: Build failed with an exception.
[stderr]
* Where:
[stderr]
Build file '/home/expo/workingdir/build/android/app/build.gradle' line: 1
[stderr]
* What went wrong:
[stderr]
A problem occurred evaluating project ':app'.
[stderr]
> Failed to apply plugin 'com.android.internal.application'.
[stderr]
> Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
[stderr]
You can try some of the following options:
[stderr]
- changing the IDE settings.
[stderr]
- changing the JAVA_HOME environment variable.
[stderr]
- changing `org.gradle.java.home` in `gradle.properties`.
[stderr]
* Try:
[stderr]
> Run with --stacktrace
[stderr]
option to get the stack trace.
[stderr]
> Run with --info or --debug option to get more log output.
[stderr]
> Run with --scan to get full insights.
[stderr]
* Get more help at
[stderr]
https://help.gradle.org
[stderr]
BUILD FAILED in 1m 49s
6 actionable tasks: 6 executed
Unable to list file systems to check whether they can be watched. The whole state of the virtual file system has been discarded. Reason: Could not query file systems: could not open mount file (errno 2: No such file or directory)
Error: Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase.