Git Product home page Git Product logo

Comments (16)

thymikee avatar thymikee commented on June 4, 2024 2

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.

matej-podzemny avatar matej-podzemny commented on June 4, 2024 1

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.

Kailash23 avatar Kailash23 commented on June 4, 2024

Fixed by installing command line tools

image

And adding this line
export PATH=$PATH:$ANDROID_HOME/cmdline-tools\latest\bin
in

image

Close and reopen the terminal

yarn react-native doctor

from cli.

matej-podzemny avatar matej-podzemny commented on June 4, 2024

@Kailash23 Why the path has \ ? 🤔

from cli.

GoldenBilly avatar GoldenBilly commented on June 4, 2024

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.

GoldenBilly avatar GoldenBilly commented on June 4, 2024

I think issue is here
image
because in windows (or at least in windows that support 64 bits) android studio's bin is studio64.exe, not studio.exe

from cli.

GoldenBilly avatar GoldenBilly commented on June 4, 2024

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.

GoldenBilly avatar GoldenBilly commented on June 4, 2024

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.

GoldenBilly avatar GoldenBilly commented on June 4, 2024

first command is similar to command in code
image

from cli.

wy-service avatar wy-service commented on June 4, 2024

Same question

from cli.

wy-service avatar wy-service commented on June 4, 2024

What should I do

from cli.

matej-podzemny avatar matej-podzemny commented on June 4, 2024

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.

GoldenBilly avatar GoldenBilly commented on June 4, 2024

What about windows?

from cli.

GoldenBilly avatar GoldenBilly commented on June 4, 2024

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

GoldenBilly avatar GoldenBilly commented on June 4, 2024

@thymikee

from cli.

GoldenBilly avatar GoldenBilly commented on June 4, 2024

No one cares...

from cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.