Reputation: 51
Running 'gradlew :app:assembleRelease' in /home/expo/workingdir/build/android Downloading https://services.gradle.org/distributions/gradle-8.6-all.zip 10%. 20%. 30%. 40%. 50%. 60%. 70%. 80%. 90% 100% Welcome to Gradle 8.6! Here are the highlights of this release:
Task :gradle-plugin:checkKotlinGradlePluginConfigurationErrors Task :gradle-plugin:pluginDescriptors Task :gradle-plugin:processResources Task :gradle-plugin:compileKotlin Task :gradle-plugin:compileJava NO-SOURCE Task :gradle-plugin:classes Task :gradle-plugin:jar FAILURE: Build completed with 2 failures. 1: Task failed with an exception.
A problem occurred configuring project ':expo-constants'. Failed to notify project evaluation listener. > compileSdkVersion is not specified. Please add it to build.gradle > Could not get unknown property 'release' for SoftwareComponent container of type org.gradle.api.internal.component.DefaultSoftwareComponentContainer.
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. Get more help at https://help.gradle.org. ============================================================================== 2: Task failed with an exception.
Could not get unknown property 'release' for SoftwareComponent container of type org.gradle.api.internal.component.DefaultSoftwareComponentContainer.
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. Get more help at https://help.gradle.org. ============================================================================== BUILD FAILED in 1m 46s 5 actionable tasks: 5 executed Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
package.json
{
"name": "abc",
"version": "1.0.0",
"scripts": {
"start": "expo start --dev-client",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"eject": "expo eject",
"test": "jest",
"lint": "eslint . --ext .ts,.tsx --quiet",
"clean:build:android": "rm -rf android/app/build",
"prod:android": "npm run clean:build:android && react-native
bundle --platform android --dev false --entry-file index.js --
bundle-output android/app/src/main/assets/index.android.bundle --
assets-dest android/app/src/main/res"
},
"dependencies": {
"@expo/vector-icons": "^14.0.0",
"@gluestack-style/react": "^1.0.49",
"@gluestack-ui/config": "^1.1.16",
"@gluestack-ui/themed": "^1.1.9",
"@react-native-async-storage/async-storage": "1.23.1",
"@react-native-masked-view/masked-view": "0.3.1",
"@react-native/metro-config": "^0.73.5",
"@react-navigation/bottom-tabs": "^6.5.7",
"@react-navigation/drawer": "^6.6.3",
"@react-navigation/native": "^6.1.7",
"@react-navigation/native-stack": "^6.9.15",
"@react-navigation/stack": "^6.3.17",
"@shopify/react-native-skia": "1.2.1",
"@types/react": "~18.0.38",
"axios": "^1.6.7",
"babel-plugin-module-resolver": "^5.0.2",
"expo": "^51.0.0-preview.8",
"expo-blur": "~13.0.1",
"expo-build-properties": "~0.12.0",
"expo-haptics": "13.0.1",
"expo-linear-gradient": "~13.0.1",
"expo-linking": "~6.3.1",
"expo-localization": "~15.0.1",
"expo-splash-screen": "~0.27.2",
"expo-status-bar": "~1.12.1",
"i18n-js": "3.8.0",
"react": "18.2.0",
"react-native": "0.74.0",
"react-native-autocomplete-dropdown": "^3.1.5",
"react-native-country-flag": "^2.0.2",
"react-native-fusioncharts": "^5.2.3",
"react-native-gesture-handler": "~2.16.0",
"react-native-keyboard-aware-scroll-view": "0.9.4",
"react-native-maps": "1.14.0",
"react-native-pager-view": "6.3.0",
"react-native-reanimated": "3.9.0-rc.1",
"react-native-safe-area-context": "4.10.0-rc.1",
"react-native-svg": "15.2.0-rc.0",
"react-native-tab-view": "^3.5.2",
"react-native-webview": "13.8.6",
"typescript": "^5.4.5"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@react-native-community/eslint-config": "2.0.0",
"@types/i18n-js": "3.8.1",
"@types/react": "~18.2.45",
"eslint": "7.28.0",
"jest-expo": "~51.0.1",
"typescript": "^5.3.0"
},
"private": true,
"jest": {
"preset": "jest-expo",
"transformIgnorePatterns": [
"node_modules/(?!(jest-)?react-native|react-clone-referenced-
element|@react-native-community|expo(nent)?|@expo(nent)?/.*|react-
navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-
expo|native-base|@sentry/.*)"
]
},
"overrides": {
"expo-modules-autolinking": "~1.11.0",
"@expo/config-plugins": "~8.0.0",
"@expo/prebuild-config": "~7.0.0",
"@expo/metro-config": "~0.18.1",
"metro": "~0.80.8",
"metro-resolver": "~0.80.8",
"metro-config": "~0.80.8"
}
}
app.json
{
"expo": {
"name": "abc",
"slug": "abc",
"description": "",
"primaryColor": "#CB0C9F",
"version": "1.0.1",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "cover",
"backgroundColor": "#1B222D"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "abc"
},
"android": {
"package": "abc",
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#CB0C9F"
}
},
"web": {
"favicon": "./assets/favicon.png"
},
"plugins": [
[
"expo-build-properties",
{
"android": {
"compileSdkVersion": 33,
"targetSdkVersion": 33,
"buildToolsVersion": "33.0.0"
},
"ios": {
"deploymentTarget": "13.4"
}
}
],
"expo-localization"
],
"extra": {
"eas": {
"projectId": "123"
}
},
"owner": "abc"
}
}
Upvotes: 0
Views: 899
Reputation: 977
I have solved a similar error just now.
Remove the following items
Install the following items
$ npm i expo-updates && npm i expo-constants
execute the following command after everything has installed
$ npm i && cd android && ./gradlew clean && ./gradlew assembleDebug && cd ..
Upvotes: 0