英文:
Where am I wrong ? Expo v48 build fails with gradlew error
问题
I am trying to create an APK build but getting this gradlew error
Node version: 18.16.0
command used: eas build -p android --profile preview
eas.json:
{
"cli": {
"version": ">= 3.14.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal",
"android": {
"buildType": "apk"
}
},
"production": {}
},
"submit": {
"production": {}
}
}
end of the error file:
Here is My Package.json file.
package.json
{
"name": "app-name",
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web"
},
"dependencies": {
"expo": "~48.0.18",
"expo-constants": "~14.2.1",
"expo-splash-screen": "~0.18.2",
"expo-status-bar": "^1.4.4",
"react": "18.2.0",
"react-native": "0.71.8",
"react-native-webview": "11.26.0"
},
"devDependencies": {
"@babel/core": "^7.20.0"
},
"private": true
}
英文:
I am trying to create an APK build but getting this gradlew error
Node version: 18.16.0
command used: eas build -p android --profile preview
eas.json:
{
"cli": {
"version": ">= 3.14.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal",
"android": {
"buildType": "apk"
}
},
"production": {}
},
"submit": {
"production": {}
}
}
Here is My Package.json file.
package.json
{
"name": "app-name",
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web"
},
"dependencies": {
"expo": "~48.0.18",
"expo-constants": "~14.2.1",
"expo-splash-screen": "~0.18.2",
"expo-status-bar": "^1.4.4",
"react": "18.2.0",
"react-native": "0.71.8",
"react-native-webview": "11.26.0"
},
"devDependencies": {
"@babel/core": "^7.20.0"
},
"private": true
}
答案1
得分: 0
我最终通过安装 expo-dev-client
得以解决此问题,奇怪的是 Expo 文档中并未提到构建 APK 需要 expo-dev-client
。
英文:
I finally got this working by installing expo-dev-client
and the strange thing is that the expo documentation had not mentioned expo-dev-client
is required for building APK.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论