reactnativecn / react-native-website

React Native 中文网
https://reactnative.cn
MIT License
219 stars 328 forks source link

npx react-native doctor 提示 - Version supported: Not Found #762

Closed tlimz closed 1 year ago

tlimz commented 1 year ago

请按以下格式提供问题的相关信息。

npx react-native doctor 提示 - Version supported: Not Found

➜  npx react-native doctor
Common
 ✓ Node.js - Required to execute JavaScript code
 ✓ yarn - Required to install NPM dependencies

Android
 ✖ Adb - No devices and/or emulators connected. Please create emulator with Android Studio or connect Android device.
 ✓ JDK - Required to compile Java code
 ✓ Android Studio - Required for building and installing your app on Android
 ✖ Android SDK - Required for building and installing your app on Android
   - Versions found: 33.0.0, 33.0.1, 34.0.0
   - Version supported: Not Found
 ✓ ANDROID_HOME - Environment variable that points to your Android SDK installation
➜  npx react-native info
info Fetching system and libraries information...
System:
  OS: Windows 10 10.0.19045
  CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
  Memory: 5.23 GB / 15.71 GB
Binaries:
  Node:
    version: 16.14.2
    path: D:\software\nodejs\node.EXE
  Yarn:
    version: 1.22.19
    path: D:\software\nodejs\yarn.CMD
  npm:
    version: 8.5.0
    path: D:\software\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK:
    API Levels:
      - "30"
      - "31"
      - "33"
      - "33"
      - "33"
    Build Tools:
      - 33.0.0
      - 33.0.1
      - 34.0.0
    System Images:
      - android-30 | Intel x86_64 Atom
      - android-31 | Intel x86_64 Atom
      - android-33 | Android Automotive with Google APIs Intel x86_64 Atom
      - android-33 | Intel x86_64 Atom
    Android NDK: Not Found
  Windows SDK:
    AllowDevelopmentWithoutDevLicense: Enabled
    Versions:
      - 10.0.17763.0
      - 10.0.22000.0
IDEs:
  Android Studio: AI-223.8836.35.2231.10811636
  Visual Studio:
    - 17.6.33829.357 (Visual Studio Community 2022)
Languages:
  Java:
    version: 11.0.19
    path: C:\Program Files\Java\jdk-11\bin\javac.EXE
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 16.14.0
    wanted: ^16.13.1
  react-native: Not Found
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found
sunnylqm commented 1 year ago

doctor的结果不重要,具体有什么别的问题?

tlimz commented 1 year ago

doctor的结果不重要,具体有什么别的问题?

运行

yarn android

程序能正常安装在真机上,但不能运行,提示没有使用权限 2c33dd3a866819fb2adf3c42d69f89d

79505cd91571b723c06e110e18090ed t

tlimz commented 1 year ago

运行日志

r - reload the app
d - open developer menu
i - run on iOS
a - run on Android

info Opening the app on Android...
info JS server already running.
info Installing the app...
> Task :gradle-plugin:compileKotlin UP-TO-DATE
> Task :gradle-plugin:compileJava NO-SOURCE
> Task :gradle-plugin:pluginDescriptors UP-TO-DATE
> Task :gradle-plugin:processResources UP-TO-DATE
> Task :gradle-plugin:classes UP-TO-DATE
> Task :gradle-plugin:jar UP-TO-DATE
> Task :gradle-plugin:inspectClassesForKotlinIC UP-TO-DATE
> Task :app:buildCodegenCLI SKIPPED
> Task :app:generateCodegenSchemaFromJavaScript SKIPPED
> Task :app:generateCodegenArtifactsFromSchema SKIPPED
> Task :app:generatePackageList
> Task :app:preBuild
> Task :app:preDebugBuild
> Task :app:compileDebugAidl NO-SOURCE
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:javaPreCompileDebug UP-TO-DATE
> Task :app:checkDebugAarMetadata UP-TO-DATE
> Task :app:generateDebugResValues UP-TO-DATE
> Task :app:mapDebugSourceSetPaths UP-TO-DATE
> Task :app:generateDebugResources UP-TO-DATE
> Task :app:mergeDebugResources UP-TO-DATE
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
> Task :app:extractDeepLinksDebug UP-TO-DATE
> Task :app:processDebugMainManifest UP-TO-DATE
> Task :app:processDebugManifest UP-TO-DATE
> Task :app:processDebugManifestForPackage UP-TO-DATE
> Task :app:processDebugResources UP-TO-DATE
> Task :app:compileDebugJavaWithJavac UP-TO-DATE
> Task :app:mergeDebugShaders UP-TO-DATE
> Task :app:compileDebugShaders NO-SOURCE
> Task :app:generateDebugAssets UP-TO-DATE
> Task :app:mergeDebugAssets UP-TO-DATE
> Task :app:compressDebugAssets UP-TO-DATE
> Task :app:processDebugJavaRes NO-SOURCE
> Task :app:mergeDebugJavaResource UP-TO-DATE
> Task :app:checkDebugDuplicateClasses UP-TO-DATE
> Task :app:desugarDebugFileDependencies UP-TO-DATE
> Task :app:mergeLibDexDebug UP-TO-DATE
> Task :app:dexBuilderDebug UP-TO-DATE
> Task :app:mergeProjectDexDebug UP-TO-DATE
> Task :app:mergeDebugJniLibFolders UP-TO-DATE
> Task :app:mergeDebugNativeLibs UP-TO-DATE
> Task :app:stripDebugDebugSymbols UP-TO-DATE
> Task :app:validateSigningDebug UP-TO-DATE
> Task :app:writeDebugAppMetadata UP-TO-DATE
> Task :app:writeDebugSigningConfigVersions UP-TO-DATE
> Task :app:mergeExtDexDebug UP-TO-DATE
> Task :app:packageDebug UP-TO-DATE
> Task :app:createDebugApkListingFileRedirect UP-TO-DATE

> Task :app:installDebug
Installing APK 'app-debug.apk' on 'NOH-AL10 - 12' for :app:debug
Installed on 1 device.

BUILD SUCCESSFUL in 32s
38 actionable tasks: 2 executed, 36 up-to-date
info Connecting to the development server...
info Starting the app on "4CN0221A14025237"...
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.myapp/.MainActivity }
sunnylqm commented 1 year ago

没有看到权限问题啊?这是报错退出了得看adb logcat,或者用as跑debug

tlimz commented 1 year ago

没有看到权限问题啊?这是报错退出了得看adb logcat,或者用as跑debug 重新建了一个工程没问题了谢谢