@react-native-firebase/analytics не удается собрать с помощью Android SDK 34, требуемого игровым магазином.Android

Форум для тех, кто программирует под Android
Ответить Пред. темаСлед. тема
Anonymous
 @react-native-firebase/analytics не удается собрать с помощью Android SDK 34, требуемого игровым магазином.

Сообщение Anonymous »

Я унаследовал чужой проект React-native. Когда я запускаю npx expo run:android, я получаю следующие ошибки:
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeExtDexDebug'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Failed to transform play-services-measurement-api-22.1.0.aar (com.google.android.gms:play-services-measurement-api:22.1.0) to match attributes {artifactType=android-dex, asm-transformed-variant=debug, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for DexingWithClasspathTransform: C:\Users\laijo\.gradle\caches\transforms-3\e0ff7396f3443335a20765bf2fad5571\transformed\jetified-play-services-measurement-api-22.1.0-runtime.jar.
> Error while dexing.

* Try:
> 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.
==============================================================================

Однако я могу устранить эту ошибку, удалив весь код в моем проекте, который использует @react-native-firebase/analytics, и удалив эту строку из моего package.json
"@react-native-firebase/analytics": "^21.0.0",

В качестве альтернативы я мог бы оставить "@react-native-firebase/analytics", но мне пришлось бы отказаться от файла app.json и перейти на более раннюю версию expo.plugins.expo-build-properties.android.* с 34 на 33. Но при понижении версии с 34 до 33 Google Playstore отклоняет мое приложение, поскольку сообщает, что SDK 33 больше не поддерживается.
Что я делаю не так? Как мне развернуть/создать реагирующее приложение?
Для справки: package.json:
{
"name": "example",
"version": "0.0.7",
"scripts": {
"submit:ios": "npx eas submit --platform ios ",
"build": "npx eas build",
"start": "expo start --dev-client",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"eject": "expo eject",
"lint": "eslint .",
"prettify": "yarn prettier --write .",
"test": "jest",
"build:tailwind": "tailwindcss --input input.css --output tailwind.css --no-autoprefixer && tailwind-rn",
"dev:tailwind": "concurrently \"tailwindcss --input input.css --output tailwind.css --no-autoprefixer --watch\" \"tailwind-rn --watch\""
},
"jest": {
"preset": "jest-expo",
"transformIgnorePatterns": [
"node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg)"
],
"setupFilesAfterEnv": [
"@testing-library/jest-native/extend-expect"
]
},
"dependencies": {
"@expo-google-fonts/open-sans": "^0.2.2",
"@expo/config-plugins": "~6.0.0",
"@react-native-async-storage/async-storage": "^2.0.0",
"@react-native-firebase/analytics": "^21.0.0",
"@react-native-firebase/app": "^21.0.0",
"@react-navigation/drawer": "^6.1.8",
"@react-navigation/material-top-tabs": "^6.0.6",
"@react-navigation/native": "^6.0.6",
"@react-navigation/native-stack": "^6.2.5",
"eslint-plugin-import": "^2.25.3",
"expo": "~48.0.21",
"expo-build-properties": "^0.12.5",
"expo-constants": "~14.2.1",
"expo-dev-client": "~2.2.1",
"expo-font": "~11.1.1",
"expo-linear-gradient": "~12.1.2",
"expo-linking": "~4.0.1",
"expo-splash-screen": "~0.18.2",
"expo-status-bar": "~1.4.4",
"firebase": "^9.6.5",
"postcss": "^8.4.5",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.71.14",
"react-native-gesture-handler": "~2.9.0",
"react-native-modal": "^13.0.0",
"react-native-pager-view": "6.1.2",
"react-native-reanimated": "~2.14.4",
"react-native-safe-area-context": "4.5.0",
"react-native-screens": "^3.34.0",
"react-native-svg": "13.4.0",
"react-native-tab-view": "^3.1.1",
"react-native-web": "~0.18.10",
"tailwind-rn": "^4.0.0"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/eslint-parser": "^7.16.5",
"@testing-library/jest-native": "^4.0.4",
"@testing-library/react-native": "^9.0.0",
"babel-eslint": "^10.1.0",
"concurrently": "^7.0.0",
"eslint": "^8.5.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-react-app": "^7.0.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.28.0",
"jest": "^29.2.1",
"jest-expo": "^48.0.0",
"prettier": "2.5.1",
"react-test-renderer": "17",
"tailwindcss": "^3.0.15"
},
"private": true
}


А вот мой app.json
{
"expo": {
"name": "example",
"slug": "example",
"version": "1.4.14",
"orientation": "portrait",
"icon": "./assets/icons/appstore.png",
"owner": "example",
"plugins": [
"@react-native-firebase/app",
[
"expo-build-properties",
{
"android": {
"compileSdkVersion": 34,
"targetSdkVersion": 34,
"buildToolsVersion": "34.0.0"
},
"ios": {
"deploymentTarget": "13.4",
"useFrameworks": "static"
}
}
]
],
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": false,
"bundleIdentifier": "com.example.app",
"googleServicesFile": "./GoogleService-Info.plist",
"buildNumber": "1.0.0"
},
"android": {
"versionCode": 24,
"googleServicesFile": "./google-services.json",
"package": "com.example.app",
"icon": "./assets/logo_big_square_2.png",
"adaptiveIcon": {
"foregroundImage": "./assets/circle_logo.png",
"backgroundColor": "#315564"
}
},
"web": {
"favicon": "./assets/favicon.png"
},
"extra": {
"eas": {
"projectId": "something"
}
}
}
}


Подробнее здесь: https://stackoverflow.com/questions/791 ... equired-by
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение
  • Не удалось собрать React Native в Android, строка @react-native-community/cli-platform-android/native_modules.gradle: 13
    Anonymous » » в форуме Android
    0 Ответы
    39 Просмотры
    Последнее сообщение Anonymous
  • Не удалось собрать React Native в Android, строка @react-native-community/cli-platform-android/native_modules.gradle: 13
    Anonymous » » в форуме Android
    0 Ответы
    30 Просмотры
    Последнее сообщение Anonymous
  • Expo React Native не может собрать Android с помощью Veriff SDK
    Anonymous » » в форуме Android
    0 Ответы
    20 Просмотры
    Последнее сообщение Anonymous
  • Expo React Native не может собрать Android с помощью Veriff SDK
    Anonymous » » в форуме Android
    0 Ответы
    31 Просмотры
    Последнее сообщение Anonymous
  • Expo React Native не может собрать Android с помощью Veriff SDK
    Anonymous » » в форуме Android
    0 Ответы
    21 Просмотры
    Последнее сообщение Anonymous

Вернуться в «Android»