-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expo build failed / SDK 48 #21784
Comments
See: #21477 (comment) You can bypass this by adding a config plugin that changes the namespaces under
And adding it to the plugins section in
|
No, it not work ,(
|
Well, now the For the ReactNativeFlipper error you will need this patch: Alternatively you can downgrade to 47: |
I deleted |
I dont have "android" folder. I use clean Expo project and i not use any gradle config files. |
I downgrade to SDK 47 and ...get new problems ,(
|
Please hint me - how it patch? I tried to find [ /node_modules/expo/docs/public/static/diffs/expo-android.diff ] - but he's not there ,(( Or am I doing it wrong? |
What worked for me was to make sure that the For some reason the I.e. My |
Same issue for me, any solution till now? |
1 similar comment
Same issue for me, any solution till now? |
Same here |
What about developers who not use gradle? I seems - SDK 48 from a box (as is) should work without any fixes?!!! It may work correctly by default as (for example) SDK 46! Now any build in EXPO is - paid! 1$ - Android and 2$ - iOS, ...How its solve the problem? ))) Maybe this will up the quality of the EXPO in the future. |
same problems in our project. We can't release a new version. It is a critical problem for my team. |
Yes, then after this adjustment make sure your "resolutions": { is upto date or atleast this version, then run expo doctor to make sure everything is okay from expo end |
My SDK 48 build work good! I am build and submit application to the Play Market and Google Store! Two weeks after I published programs in the Market/Store - my client asked to make minor changes in the color scheme. I change two variable values ...and I could no longer build the program in the cloud. The original (submited/published) version also crashed too. |
Same here |
It make me another problems. The history:
|
It's very strange that when I don't build locally its fine, but when i add the --local tag its suddenly broken 🤔 |
wow.. so the error already occured from the default app?? |
you are right, very strange expo give a wrong namespace. but the difference is i'm using the old === Oh, I have found that ReactNativeFlipper.java in the release folder is created with the wrong package name. |
yes |
Same problem. Anyone been able to find a solution? |
Same problem, no android folder. Just clean expo project with all default files. |
It worked!! I created my app with the package name "app.name" and for some reason the namespace was "com.name", it worked as soon as I changed the "com" to "app" |
I faced same error. Expo is generated wrong namespace.
For Example package.json
and app.json
It fixed my problem. |
Removed expo-cli from dependencies, it worked for me |
Very niice, This worked for me. |
Wow! Thanks! That's the best workaround ever. Was totally expecting to have to edit source java files... |
It's worked for me. Thanks ! |
This is the best solution |
I have the same issue in sdk 49 even though I don't have the global expo-cli installed |
I have the same issue in SDK 48.0.18 |
None of the above solutions worked. |
+1 None of the above solutions worked :( |
I got it. This helps for me:
now it should be clean and you can build your package with
|
This issue was a journey. I think I finally got everything working the way I needed. I'll list my steps below. I basically ran into two main issues:
It's important to note that the second issue only appears on release builds (I use expo to create builds in the cloud). The first issue impacts dev builds and release builds. In order to fix this, I referenced several of the other fixes on this thread to create a single expo plugin that:
Inside my import { withAppBuildGradle, withMainApplication, createRunOncePlugin } from '@expo/config-plugins';
/**
* This plugin is a temporary fix that is needed to fix Android builds on Expo 48.
* There are two main issues:
* 1. The namespace in android/app/build.gradle needs to match
* the application id (like com.app.env), but it is set incorrectly
* 2. The folder structure and package name in android/app/src/release/com/XXX/ReactNativeFlipper.java
* is not created correctly
*/
const withAndroidExpoFix = (config) => {
// Fix the namespace in android/app/build.gradle
config = withAppBuildGradle(config, (config) => {
const buildGradle = config.modResults.contents;
const namespace = config?.android?.package?.toString?.();
const newContents = buildGradle.replace(/namespace (.*)\n/, `namespace '${namespace}'\n`);
config.modResults.contents = newContents;
console.log(`[withAndroidExpoFix] Change build.gradle namespace to ${namespace}`);
return config;
});
// Remove ReactNativeFlipper
config = withMainApplication(config, async (config) => {
const mainApplication = config.modResults.contents;
const newContents = mainApplication?.replace(
'ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager());',
''
);
config.modResults.contents = newContents;
console.log(`[withAndroidExpoFix] Remove ReactNativeFlipper`);
return config;
});
return config;
};
export default createRunOncePlugin(withAndroidExpoFix, 'withAndroidExpoFix', '1.0.0'); Inside my
After testing, I've been able to run it locally and the release build finally succeeded. Hope this helps anyone else who is dealing with both issues. |
For me too. I remove locally and globally. To use androidSdk 49.0.0. I just remove the expo-cli from the project and globally. i.e:
Now I run expo start. And type 's' for Expo Go, for example. |
so i'm currently giving this a go, i'm on expo 49 and have been experiencing the same issues about, it's a joke. ANy idea when expo are going to fix this? |
any solution? |
Still facing same problems |
I solved the problem, you need to use the new expo-cli commands, if you want help, tomorrow I will be able to answer in more detail what is required for the upgrade |
I am on expo 49 (latest?) and the problem also occurs.
HaimAbeles ***@***.***> schrieb am Mo. 28. Aug. 2023 um 21:17:
… Still facing same problems
I solved the problem, you need to use the new expo-cli commands, if you
want help, tomorrow I will be able to answer in more detail what is
required for the upgrade
—
Reply to this email directly, view it on GitHub
<#21784 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AH6AXYPJQHE6KGO6QCZCFNLXXTVFHANCNFSM6AAAAAAWBUK2HQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I'm also on the latest (49), the solution was a bit of configuration in app.json + using the new expo cli commands |
Ok, I'll check it out.
HaimAbeles ***@***.***> schrieb am Mo. 28. Aug. 2023 um 21:30:
… I am on expo 49 (latest?) and the problem also occurs. HaimAbeles *@*.***>
schrieb am Mo. 28. Aug. 2023 um 21:17:
I'm also on the latest (49), the solution was a bit of configuration in
app.json + using the new expo cli commands
—
Reply to this email directly, view it on GitHub
<#21784 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AH6AXYL5X4O5IAXE47QXE4DXXTWVLANCNFSM6AAAAAAWBUK2HQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
this is the solution: |
Hi there! It looks like your issue requires a minimal reproducible example, but it is invalid or absent. Please prepare such an example and share it in a new issue. The best way to get attention to your issue is to provide a clean and easy way for a developer to reproduce the issue on their own machine. Please do not provide your entire project, or a project with more code than is necessary to reproduce the issue. A side benefit of going through the process of narrowing down the minimal amount of code needed to reproduce the issue is that you may get lucky and discover that the bug is due to a mistake in your application code that you can quickly fix on your own. ResourcesCommon concerns"I've only been able to reproduce it in private, proprietary code"You may not have spent enough time narrowing down the root cause of the issue. Try out the techniques discussed in this manual debugging guide to learn how to isolate the problem from the rest of your codebase. "I didn't have time to create one"That's understandable, it can take some time to prepare. We ask that you hold off on filing an issue until you are able to fully complete the required fields in the issue template. "You can reproduce it by yourself by creating a project and following these steps"This is useful knowledge, but it's still valuable to have the resulting project that is produced from running the steps, where you have verified you can reproduce the issue. |
|
Your are a genius. U saved my life |
what a clown fiesta |
hi, i have the same problem with Expo 48 yarn build android, it failed with Gradle build failed with unknown error and Code 1
I contacted with expo support team |
This works for me. 👍 @DR1988 , are there potential side effects to removing this flipper initialization? |
I was similar issue in with expo 49. And this solved it!! Thanks |
Creo que es un problema con el "package name" yo probe a cambiar el nombre del mismo y compilo sin problemas en SDK48 y SDK49 app.json original "android": { por "android": { |
Summary
Build failed after update to SDK 48 (from SDK 46).
No any errors while application running in development mode.
Any help?
What platform(s) does this occur on?
Android
SDK Version
48
Environment
System:
OS: macOS 13.2.1
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.16.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 8.11.0 - /usr/local/bin/npm
IDEs:
Xcode: /undefined - /usr/bin/xcodebuild
npmPackages:
@expo/metro-config: ^0.5.2 => 0.5.2
@expo/webpack-config: ^18.0.1 => 18.0.1
expo: ^48.0.0 => 48.0.8
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
react-native: 0.71.3 => 0.71.3
react-native-web: ~0.18.11 => 0.18.12
Expo Workflow: managed
Minimal reproducible example
package.json
Stacktrace (if a crash is involved)
The text was updated successfully, but these errors were encountered: