آموزش جاوااسکریپت انجمن ها react native مشکل در استفاده از react-navigation پاسخ به: مشکل در استفاده از react-navigation

#27283
npb
مشارکت کننده

سلام
این خطا هست
JS server already running.
Building and installing the app on the device (cd android && gradlew.bat installDebug)…

> Configure project :app
WARNING: The specified Android SDK Build Tools version (28.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.2.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove “buildToolsVersion ‘28.0.2’” from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
Observed package id ‘build-tools;26.0.0-rc2’ in inconsistent location ‘D:\Best_Edu_ForBuildProgramer\ReactNative\software\SDK\SDK\build-tools\26.0.0-preview’ (Expected ‘D:\Best_Edu_ForBuildProgramer\ReactNative\software\SDK\SDK\build-tools\26.0.0-rc2’)
Observed package id ‘build-tools;26.0.0-rc2’ in inconsistent location ‘D:\Best_Edu_ForBuildProgramer\ReactNative\software\SDK\SDK\build-tools\26.0.0-preview’ (Expected ‘D:\Best_Edu_ForBuildProgramer\ReactNative\software\SDK\SDK\build-tools\26.0.0-rc2’)

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ‘:app’.
> Failed to find target with hash string ‘23.0’ in: D:\Best_Edu_ForBuildProgramer\ReactNative\software\SDK\SDK

* 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 5s
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html

Command failed: gradlew.bat installDebug

Error: Command failed: gradlew.bat installDebug
at checkExecSyncError (child_process.js:621:11)
at Object.execFileSync (child_process.js:639:13)
at runOnAllDevices (D:\nativeproject\reactnavigation\node_modules\react-native\local-cli\runAndroid\runAndroid.js:299:19)
at buildAndRun (D:\nativeproject\reactnavigation\node_modules\react-native\local-cli\runAndroid\runAndroid.js:135:12)
at isPackagerRunning.then.result (D:\nativeproject\reactnavigation\node_modules\react-native\local-cli\runAndroid\runAndroid.js:65:12)
at process.internalTickCallback (internal/process/next_tick.js:77:7)

این تنظیم اخری هم داخل فایل android/build.gradle گذاشتم درسته؟
buildscript {
ext {
buildToolsVersion = “28.0.2”
minSdkVersion = 16
compileSdkVersion = “23.0”
targetSdkVersion = 27
supportLibVersion = “28.0.0”
}
repositories {
google()
jcenter()
}
dependencies {
classpath ‘com.android.tools.build:gradle:3.2.1’

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}