Comments (16)
It’s likely a bug on our end, nothing to worry about, unless you face issues building for Android from the CLI.
Since we miss Windows contributors, we’d appreciate any help resolving this AS resolution bug
from cli.
Same issue here, I have the android studio installed via JetBrain Toolbox and the doctor cannot found it at all, everything else works fine.
I tried to set this, but no luck so far..
export STUDIO_JDK=~/Applications/Android\ Studio.app
export PATH="$STUDIO_JDK:$PATH"
from cli.
Fixed by installing command line tools
And adding this line
export PATH=$PATH:$ANDROID_HOME/cmdline-tools\latest\bin
in
Close and reopen the terminal
yarn react-native doctor
from cli.
@Kailash23 Why the path has \
? 🤔
from cli.
I have the same issue, but app building and running just fine on my android device, so it's only doctor's issue.
from cli.
I think issue is here
because in windows (or at least in windows that support 64 bits) android studio's bin is studio64.exe, not studio.exe
from cli.
maybe if we replace it with that:
const prefix = process.arch === 'x64' ? '64' : '';
const androidStudioPath = join(
getUserAndroidPath(),
'android-studio',
'bin',
`studio${prefix}.exe`
)
it will be fixed but I'm not sure about that
from cli.
or maybe its because of wmic, when I've tried to execute it with
wmic datafile where name="C:\\Users\va126\\AppData\\Local\\Android\\android-studio\\bin\\studio64.exe" get Version
It gave me this error:
Unexpected switch at this level.
But when I've tried this:
wmic datafile where "Name='C:\\Users\\va126\\AppData\\Local\\Android\\android-studio\\bin\\studio64.exe'" get version
It worked just fine and gave me this version:
2022.3.0.0
So I think it can be also because of wmic.
from cli.
first command is similar to command in code
from cli.
Same question
from cli.
What should I do
from cli.
It is doctor issue, actually in its dependecy envinfo. The issue was raised here, and is already merged: tabrindle/envinfo#252 (review)
SOLUTION: If you still struggle, you can create alias folder to help doctor found it, for mac use this command:
ln -s /Applications/Android\ Studio.app/Contents ~/Applications/Android\ Studio.app/Contents
from cli.
What about windows?
from cli.
I've tried my fix, and it worked just fine for me.
All what I've changed is:
const prefix = process.arch === 'x64' ? '64' : '';
const androidStudioPath = join(
getUserAndroidPath(),
'android-studio',
'bin',
`studio${prefix}.exe`
).replace(/\\/g, '\\\\');
const {stdout} = await executeCommand(
`wmic datafile where "Name='${androidStudioPath}'" get version`,
);
In /packages/cli-doctor/src/tools/healthchecks/androidStudio.ts
from cli.
from cli.
No one cares...
from cli.
Related Issues (20)
- cannot start Android emulator version 34.1.20.0 (build_id 11610631) HOT 1
- Cannot find module 'execa' when running npx react-native clean
- (node:23249) [DEP0040] DeprecationWarning: The punycode module is deprecated HOT 5
- error index.js: Cannot read properties of undefined (reading 'match'). HOT 1
- How do you set mode with 'react-native start'? HOT 3
- Error on fresh projects in Lauching app in the emulator, RN -v 0.73 - Starting: intent HOT 3
- sdk version problem HOT 1
- Something is trying to use the devDependency 'metro-config' when building a production release build HOT 4
- Fail to download yarn if there is expired GITHUB_TOKEN HOT 4
- Android SDK: Not Found HOT 1
- Project initialization hangs HOT 5
- Failure of pod install for the React Native project using Yarn Berry - Yarn 3.x or 4.x. HOT 3
- Getting Error While initialization react native app in ubuntu HOT 12
- Undeclared identifer in OnLoad.cpp.o HOT 8
- Able to build ios app but unable to get build settings to deplou
- Handle prompts in `init` command HOT 1
- React Native Build Failed After update build.gradle compileSdkVersion=34
- Read main activity from manifest not correctly handling activities with "missing" intent nodes
- How to fix CompileC normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'Pods-urbex' from project 'Pods') failure in react-native ios HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cli.