I'm on Expo SDK 44, did npx expo install expo-build-properties under my project directory, and added the following code in app.json:
"plugins": [
[
"expo-image-picker",
{
"photosPermission": "This app needs to access your photos to let you share them with your friends."
}
],
[
"expo-build-properties",
{
"android": {
"compileSdkVersion": 31,
"targetSdkVersion": 31,
"buildToolsVersion": "31.0.0"
},
"ios": {
"deploymentTarget": "13.0"
}
}
]
],
The app builds and runs fine, but when I upload the .aab file to the Google Play Console, I get "The current target API level of your app is 30, but the minimum target API level must be 31".
expo-build-properties does not exist in expo 44. You need to upgrade to expo 45 or higher
Related
Expo app running on:
Expo Version 43
Android Q 10.0 API29
After migrating to eas build from expo build with the following config:
"androidNavigationBar": {
"visible": "sticky-immersive"
}
The navigation bar now shows. Previously the app was full screen.
Have installed 'expo-navigation-bar' and changed config to the following:
"androidStatusBar": {
"hidden": true
},
"plugins": [
[
"expo-navigation-bar",
{
"position": "absolute",
"visibility": "hidden",
"behavior": "inset-swipe",
"backgroundColor": "#00000000"
}
]
]
The backgroundColor is getting applied, however the visbility isn't.
It works correctly when trying on Android 11 on the emulator with the navigation bar being hidden, however is there a way I can make it hidden on Android 10.0? Have also tried upgrading to Expo 44 with Android 10.0 to no avail.
Alternatively, is there something else I can do via the code to hide the bar/make the app full screen?
Thanks alot!
I recently updated our Expo project from sdk 44 to 46.
During that process, I switched from Expo build:android to eas build -p android.
Everything is running as expected, except the version code is not compiled into the aab/apk files correctly, so I cant push updates to google play.
The version code is already set to 26, as we did release previous versions, and the semVer is 1.1.1 currently. EAS also doesn't show the correct version codes in the dashboard.
I tried setting "appVersionSource": "local" as well as "remote", but neither works. (As far as I understand, local should be the correct parameter.
eas build generally seems to ignore other parameters from the app.config.js, like the splash images, app icons and background colors (I didn't include those lines in the code examples below to keep it short)
eas.json
{
"cli": {
"version": ">= 2.3.0",
"appVersionSource": "local"
},
"build": {
...
"production": {
"channel": "production",
"env": {
"APP_ENV": "production"
},
"android": {
"buildType": "app-bundle",
"image": "latest"
}
}
},
"submit": {
"production": {}
}
}
app.config.js
import 'dotenv/config';
module.exports = {
expo: {
name: '...',
slug: '...',
version: '1.1.1',
assetBundlePatterns: ['**/*'],
android: {
package: '...',
versionCode: 26,
softwareKeyboardLayoutMode: 'pan',
},
extra: {
eas: {
projectId: '...',
},
releaseChannel: process.env.APP_ENV,
},
},
};
Eas showing the wrong version nr
Try running npx expo prebuild or npx expo run:android That would generate the native Android project, which is basically like the Bare workflow.
See the following post for some more details and what you can do:
https://forums.expo.dev/t/should-i-exclude-ios/63094/4
If this helped you I would really appreciate it if you mark this as the answer. Thanks :)
I'm new to google play console so I'm not sure about what is happening. When I try to upload my bundle it just says I have an API versión of 30 and that I need to have at least 31 but my build has an SDK of 44. I've tried to downgrade the SDK from 44 to 31, tried to build it with "expo build:android" and with "eas build --platform android", nothing changed... Am I missing some config in the code or is it something else?
Here an image of the build from the expo.dev webpage.
Here the message i recive when i try to upload the bundle to GooglePlay Console."
The message in English says: "Currently, your app's target API level is 30, but it must be at least 31 to ensure it compiles with the latest APIs, which provide optimal security and performance. Change your application's target API level to level 31 or higher. More information
And the "More information" link: https://developer.android.com/google/play/requirements/target-sdk
I ended up triying the expo-build-properties but didn't even worked...
"plugins": [
[
"expo-build-properties",
{
"android": {
"minSdkVersion": 31,
"compileSdkVersion": 31,
"targetSdkVersion": 31,
"buildToolsVersion": "31.0.0"
},
"ios": {
"deploymentTarget": "13.0"
}
}
]
]
You should define this :
minSdkVersion = 23
compileSdkVersion = 31
targetSdkVersion = 31
Recently we build Android Apps using react expo and build signed APK using bellow command expo build:android -t apk or Android App Bundle expo build:android -t app-bundle
After we build signed APK, we tried to upload to Playstore and some error appears that wanted us to upgrade target API from 26 to 28. Have explored and reading several QA at SO and many of them are intended for React Native. How we can publish our APK to Play Store?
Here are app.json
{
"expo": {
"name": "***",
"slug": "***",
"privacy": "public",
"sdkVersion": "32.0.0",
"platforms": [
"ios",
"android"
],
"version": "1.2.3",
"orientation": "portrait",
"icon": "./assets/logo.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"enabled": true,
"checkAutomatically": "ON_LOAD",
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"package": "com.qreatiq.foodmart",
"permissions": [
"CAMERA"
],
"googleServicesFile": "./google-services.json",
},
}
}
We've tried to check the documentation here and there are property for compileSDKVersion or related like native apps.
In Native app we can easily configure as bellow
compileSdkVersion 27
buildToolsVersion "27.0.3"
minSdkVersion 16
targetSdkVersion 27
How to do that at React Expo?
Update 1
after reading from developer.android.com
When you upload an APK, it needs to meet Google Play’s target API
level requirements. Starting August 1, 2019, Google Play requires that
new apps target at least Android 9.0 (API level 28), and that app
updates target Android 9.0 from November 1, 2019. Until these dates,
new apps and app updates must target at least Android 8.0 (API level
26).
Still doesn't have any idea for that things.
Follow these steps:
Close your Expo CLI server
In app.json, change sdkVersion to "34.0.0"
In package.json, change these dependencies:
react-native to "https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz"
expo to "^34.0.3"
react to "16.8.3" — (this exact version)
react-navigation to "^3.11.1"
jest-expo to "^34.0.0" (if you use it)
sentry-expo to "~1.13.0" (if you use it)
If you use react-navigation you should also run expo install react-native-gesture-handler react-native-reanimated
Delete your project’s node_modules directory and run npm install again or use yarn
Run expo start -c
After these steps, it should work.
Source: https://blog.expo.io/expo-sdk-34-is-now-available-4f7825239319
You need to change the sdkVersion property in your app.json and build the application again:
"sdkVersion": "34.0.0",
"platforms": [
"ios",
"android"
],
using the expo build:android -t app-bundle command.
Make sure you have the latest expo cli installed.
Here's the corresponding blog post.
We are developing a COSU app using Android Management API and QR code provisioning. We're planning to distribute app with private Google play, but for now I'm trying to make it work with manual installation using apk. That's how it should work:
A client receives qr code from us, that applies policy without restrictions to the device.
After provisioning client downloads apk from some other source (probably via email) and installs it.
Client applies policy with restrictions from app with call to API.
So, I'm stuck on second step - an attempt to install downloaded apk leads to this error:
Default policy seems to be ok:
{
"name": "enterprises/<enterpriseName>/policies/policy_unlocked",
"version": "11",
"applications": [
{
"packageName": "com.axmor.fsinphone",
"installType": "AVAILABLE",
"defaultPermissionPolicy": "GRANT"
}
],
"persistentPreferredActivities": [
{
"receiverActivity": "com.axmor.fsinphone",
"actions": [
"android.intent.action.MAIN"
]
}
],
"systemUpdate": {
"type": "WINDOWED",
"startMinutes": 120,
"endMinutes": 240
},
"debuggingFeaturesAllowed": true
}
]
}
And this policy is applied to device:
"policyName": "enterprises/<enterpriseName>/policies/policy_unlocked",
"appliedPolicyName": "enterprises/<enterpriseName>/policies/policy_unlocked",
What I've tried:
Installing release apk and signed apk (same result)
Installing apk with adb from Android studio - this works, but it's not what I want.
(copying the solution here from comments)
To be able to install apps from outside the Play Store you need to set installUnknownSourcesAllowed to true in the Policy. More details in the policy references.