В настоящее время я работаю над мобильным приложением в монорепозитории.
Приложение работает нормально при запуске с Expo Go и в сборке для разработки, но когда я пытаюсь установить APK из предварительной сборки, я застреваю на косой черте.
Каталог моего приложения выглядит так:
monorepo/
package.json
mobile/
app/
metro.config,js
eas.json
app.config.js
package.json
project.json
src/
app/
_layout.tsx
index.tsx
Мой metro.config.js —
const { withNxMetro } = require('@nx/expo');
const { getDefaultConfig } = require('expo/metro-config');
const { mergeConfig } = require('metro-config');
const { withUniwindConfig } = require('uniwind/metro');
const defaultConfig = getDefaultConfig(__dirname);
const { assetExts, sourceExts } = defaultConfig.resolver;
/**
* Metro configuration
* https://reactnative.dev/docs/metro
*
* @type {import('metro-config').MetroConfig}
*/
const customConfig = {
cacheVersion: '@[...]',
transformer: {
babelTransformerPath: require.resolve('react-native-svg-transformer'),
},
resolver: {
assetExts: assetExts.filter((ext) => ext !== 'svg'),
sourceExts: [...sourceExts, 'cjs', 'mjs', 'svg'],
extraNodeModules: {
url: require.resolve('react-native-url-polyfill'),
stream: require.resolve('stream-browserify'),
http: require.resolve('stream-http'),
https: require.resolve('https-browserify'),
},
},
};
module.exports = withUniwindConfig(
withNxMetro(mergeConfig(defaultConfig, customConfig), {
// Change this to true to see debugging info.
// Useful if you have issues resolving modules
debug: false,
// all the file extensions used for imports other than 'ts', 'tsx', 'js', 'jsx', 'json'
extensions: [],
// Specify folders to watch, in addition to Nx defaults (workspace libraries and node_modules)
watchFolders: [],
}),
{
// relative path to your global.css file (from previous step)
cssEntryFile: './src/global.css',
// (optional) path where we gonna auto-generate typings
// defaults to project's root
dtsFile: './src/uniwind-types.d.ts',
}
);
npx expo-doctor возвращает
✖ Check for issues with Metro config
- "projectRoot" mismatch. Expected /Users/[...]/monorepo/mobile-apps/investor, got: /Users/[...]/monorepo
Advice:
Modifying the "metro.config.js" is dangerous and may lead to unintended consequences.
Unless you know what these overrides do, remove them and adopt the recommended values from "expo/metro-config".
✖ Check dependencies for packages that should not be installed directly
The package "@expo/metro-config" should not be installed directly in your project. You should instead use "expo/metro-config" which is a sub-export of the expo package.
Advice:
Remove these packages from your package.json.
✖ Check for app config fields that may not be synced in a non-CNG project
This project contains native project folders but also has native configuration properties in app.config.js, indicating it is configured to use Prebuild. When the android/ios folders are present, EAS Build will not sync the following properties: orientation, icon, scheme, userInterfaceStyle, ios, android, plugins, androidStatusBar.
✖ Check that packages match versions required by installed Expo SDK
npm warn Unknown env config "node-linker". This will stop working in the next major version of npm.
npm warn Unknown project config "node-linker". This will stop working in the next major version of npm.
Advice:
Use 'npx expo install --check' to review and upgrade your dependencies.
To ignore specific packages, add them to "expo.install.exclude" in package.json. Learn more.
В Android Studio я получаю сообщение об ошибке
{ [Error: No routes found] componentStack:
'at ContextNavigator (address at /data/user/0/[...]/files/.expo-internal/1340bd957052132c38381027ad12bc52:1:937191)
at ExpoRoot (address at /data/user/0/[...]/files/.expo-internal/1340bd957052132c38381027ad12bc52:1:936834)
at App ()
at RCTView ()
at View (address at /data/user/0/[...]/files/.expo-internal/1340bd957052132c38381027ad12bc52:1:807932)
at View (address at /data/user/0/[...]/files/.expo-internal/1340bd957052132c38381027ad12bc52:1:143859)
at AppContainer (address at /data/user/0/[...]/files/.expo-internal/1340bd957052132c38381027ad12bc52:1:498322)', isComponentError: true }
Подробнее здесь: https://stackoverflow.com/questions/798 ... th-apk-pre
Мобильное приложение работает с dev build/ExpoGo, но зависает на заставке при предварительной сборке APK ⇐ Android
Форум для тех, кто программирует под Android
1768483127
Anonymous
В настоящее время я работаю над мобильным приложением в монорепозитории.
Приложение работает нормально при запуске с Expo Go и в сборке для разработки, но когда я пытаюсь установить APK из предварительной сборки, я застреваю на косой черте.
Каталог моего приложения выглядит так:
monorepo/
package.json
mobile/
app/
metro.config,js
eas.json
app.config.js
package.json
project.json
src/
app/
_layout.tsx
index.tsx
Мой metro.config.js —
const { withNxMetro } = require('@nx/expo');
const { getDefaultConfig } = require('expo/metro-config');
const { mergeConfig } = require('metro-config');
const { withUniwindConfig } = require('uniwind/metro');
const defaultConfig = getDefaultConfig(__dirname);
const { assetExts, sourceExts } = defaultConfig.resolver;
/**
* Metro configuration
* https://reactnative.dev/docs/metro
*
* @type {import('metro-config').MetroConfig}
*/
const customConfig = {
cacheVersion: '@[...]',
transformer: {
babelTransformerPath: require.resolve('react-native-svg-transformer'),
},
resolver: {
assetExts: assetExts.filter((ext) => ext !== 'svg'),
sourceExts: [...sourceExts, 'cjs', 'mjs', 'svg'],
extraNodeModules: {
url: require.resolve('react-native-url-polyfill'),
stream: require.resolve('stream-browserify'),
http: require.resolve('stream-http'),
https: require.resolve('https-browserify'),
},
},
};
module.exports = withUniwindConfig(
withNxMetro(mergeConfig(defaultConfig, customConfig), {
// Change this to true to see debugging info.
// Useful if you have issues resolving modules
debug: false,
// all the file extensions used for imports other than 'ts', 'tsx', 'js', 'jsx', 'json'
extensions: [],
// Specify folders to watch, in addition to Nx defaults (workspace libraries and node_modules)
watchFolders: [],
}),
{
// relative path to your global.css file (from previous step)
cssEntryFile: './src/global.css',
// (optional) path where we gonna auto-generate typings
// defaults to project's root
dtsFile: './src/uniwind-types.d.ts',
}
);
npx expo-doctor возвращает
✖ Check for issues with Metro config
- "projectRoot" mismatch. Expected /Users/[...]/monorepo/mobile-apps/investor, got: /Users/[...]/monorepo
Advice:
Modifying the "metro.config.js" is dangerous and may lead to unintended consequences.
Unless you know what these overrides do, remove them and adopt the recommended values from "expo/metro-config".
✖ Check dependencies for packages that should not be installed directly
The package "@expo/metro-config" should not be installed directly in your project. You should instead use "expo/metro-config" which is a sub-export of the expo package.
Advice:
Remove these packages from your package.json.
✖ Check for app config fields that may not be synced in a non-CNG project
This project contains native project folders but also has native configuration properties in app.config.js, indicating it is configured to use Prebuild. When the android/ios folders are present, EAS Build will not sync the following properties: orientation, icon, scheme, userInterfaceStyle, ios, android, plugins, androidStatusBar.
✖ Check that packages match versions required by installed Expo SDK
npm warn Unknown env config "node-linker". This will stop working in the next major version of npm.
npm warn Unknown project config "node-linker". This will stop working in the next major version of npm.
Advice:
Use 'npx expo install --check' to review and upgrade your dependencies.
To ignore specific packages, add them to "expo.install.exclude" in package.json. Learn more.
В Android Studio я получаю сообщение об ошибке
{ [Error: No routes found] componentStack:
'at ContextNavigator (address at /data/user/0/[...]/files/.expo-internal/1340bd957052132c38381027ad12bc52:1:937191)
at ExpoRoot (address at /data/user/0/[...]/files/.expo-internal/1340bd957052132c38381027ad12bc52:1:936834)
at App ()
at RCTView ()
at View (address at /data/user/0/[...]/files/.expo-internal/1340bd957052132c38381027ad12bc52:1:807932)
at View (address at /data/user/0/[...]/files/.expo-internal/1340bd957052132c38381027ad12bc52:1:143859)
at AppContainer (address at /data/user/0/[...]/files/.expo-internal/1340bd957052132c38381027ad12bc52:1:498322)', isComponentError: true }
Подробнее здесь: [url]https://stackoverflow.com/questions/79868595/mobile-app-working-with-dev-build-expogo-but-stuck-on-splash-screen-with-apk-pre[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия