@Farazendasss

Как поменять версию проекта?

Как переименовать проект в файле android/app/ build.gradl ??
5e5cb0500827e433160132.png

Для того что бы опубликовать приложение в play market мне надо поменять эти значения.Но когда я их меняю проэкт не запускаеться с ошибкой
$ react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1242 file(s) to forward-jetify. Using 12 workers...
info JS server already running.
info Installing the app...

> Configure project :react-native-image-rotate
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.4.2.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '23.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

> Task :app:installDebug
08:57:40 V/ddms: execute: running am get-config
08:57:41 V/ddms: execute 'am get-config' on '3PQNU19426206783' : EOF hit. Read: -1
08:57:41 V/ddms: execute: returning
Installing APK 'app-debug.apk' on 'KSA-LX9 - 9' for app:debug
08:57:41 D/app-debug.apk: Uploading app-debug.apk onto device '3PQNU19426206783'
08:57:41 D/Device: Uploading file onto device '3PQNU19426206783'
08:57:41 D/ddms: Reading file permision of G:\Nikita\project-fuor\photosearch\android\app\build\outputs\apk\debug\app-debug.apk as: rwx------
08:57:42 V/ddms: execute: running pm install -r -t "/data/local/tmp/app-debug.apk"
08:57:43 V/ddms: execute 'pm install -r -t "/data/local/tmp/app-debug.apk"' on '3PQNU19426206783' : EOF hit. Read: -1
08:57:43 V/ddms: execute: returning

> Task :app:installDebug FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:command_line_warnings
297 actionable tasks: 12 executed, 285 up-to-date
Unable to install G:\Nikita\project-fuor\photosearch\android\app\build\outputs\apk\debug\app-debug.apk
com.android.ddmlib.InstallException: INSTALL_FAILED_VERSION_DOWNGRADE
        at com.android.ddmlib.Device.installRemotePackage(Device.java:1063)
        at com.android.ddmlib.Device.installPackage(Device.java:903)
        at com.android.ddmlib.Device.installPackage(Device.java:881)
        at com.android.ddmlib.Device.installPackage(Device.java:870)
        at com.android.builder.testing.ConnectedDevice.installPackage(ConnectedDevice.java:126)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_FAILED_VERSION_DOWNGRADE

* 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.

* Get more help at https://help.gradle.org

BUILD FAILED in 42s

error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
Unable to install G:\Nikita\project-fuor\photosearch\android\app\build\outputs\apk\debug\app-debug.apk
com.android.ddmlib.InstallException: INSTALL_FAILED_VERSION_DOWNGRADE
        at com.android.ddmlib.Device.installRemotePackage(Device.java:1063)
        at com.android.ddmlib.Device.installPackage(Device.java:903)
        at com.android.ddmlib.Device.installPackage(Device.java:881)
 
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_FAILED_VERSION_DOWNGRADE

* 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.

* Get more help at https://help.gradle.org

BUILD FAILED in 42s

    at checkExecSyncError (child_process.js:621:11)
    at execFileSync (child_process.js:639:15)
    at runOnAllDevices (G:\Nikita\project-fuor\photosearch\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:39)
    at buildAndRun (G:\Nikita\project-fuor\photosearch\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
    at G:\Nikita\project-fuor\photosearch\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Command.handleAction (G:\Nikita\project-fuor\photosearch\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:164:9)
  • Вопрос задан
  • 30 просмотров
Решения вопроса 1
RomReed
@RomReed
JavaScript, React js, ReactNative, Redux, Firebase
INSTALL_FAILED_VERSION_DOWNGRADE это значит чтр у вас на телефоне установлена версия больше чем вы пытаетесь установить. Просто поставьте versionName :'1.9' и versionCode:9 думаю должно заработать.
Если вам надо заменить iplicationId то там не все так просто. Его придется заменить во всем проекте. Вот в какиех местах его придется поменять
index.android.js
android/settings.gradle
android/app/build.gradle
android/app/src/main/AndroidManifest.xml
android/app/src/main/java/com/<app id>/MainActivity.java
android/app/src/main/java/com/<app id>/MainApplication.java
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы