Missing Android platform(s) detected: 'android-27' - android-studio-3.1.3

I update my android studio to 3.1.3 but I cannot use platform 27 now
when I click "install platform and sync project" it pop up a download window and then disappear. But the error still exist. SDK Platforms is following:
expand SDK:

For anyone get this issue, you should uninstall Android SDK 27 then re-install it from SDK download manager.

#TrongHiue's answer didn't work for me. (Mac user, Android 3.2.1).
I had to close the IDE, go to Library/Android/sdk and rename the 'sdk' folder to 'sdk2'. Then reopen Android Studio - it will prompt you to tell you it can't find the old sdk folder but will automatically use sdk2. Hit ok. Then, let Android Studio re-index. It will now find platform 27 and you should be able to launch your app.
If you want to change your sdk folder back from skd2 to sdk, close the IDE, rename back to 'sdk', re-open the IDE, update the SDK location in File -> Project Structure, and make sure local.properties is pointing to 'sdk' folder and not 'sdk2'.

In my case, I fixed it by click "Edit" (Next to Android SDK Location) and install SDK platform at SDK Setup window.
Click here to see image

For me neither options worked.
I've updated to SKD 29 and Android Studio 3.6.
What did help was going to the SDK Manager and click the "Edit" link next to Android SDK Location. In the next screen you will see a message saying that an existing Android SDK was detected and only missing or outdated SDK components will be downloaded. Click Next and problem solved!

Ran into same problem but with API 26 and (win) studio 3.5.1. XavierDominguez solution was close to what I had to do to fix it. Close IDE, renamed Sdk to Sdk2, reopened studio, problem persisted so closed IDE, renamed it back to Sdk, reopened and worked this time around. Posted in case someone ran across same problem.

This usually happens when popup for update tools and you click on Update and after some time before finishing Update you Cancel It.
Simply Go to FIle--> Invalidate Caches/Restart

This can happen when your sdk location directory has space in it.
Change directory without space and re-build the project. It worked for me.
Old SDK Location: "C:\Users\DELL 15\android-sdks"
New Location: "C:\Users\android-sdks"

Related

“launchPackager.command” can’t be opened

Just updated my Mac to the official release of Ventura, and I cannot launch my application via react-native run-ios.
Expected behavior:
running react-native run-ios will launch an Xcode simulator and a terminal window with Metro running.
Current behavior:
Xcode simulator opens, main terminal says app was built successfully, but an error is thrown instead of the metro terminal opening:
“launchPackager.command” can’t be opened because (null) is not allowed to open documents in Terminal.
The simulator just shows a white screen and can't be interacted with.
What I've tried:
manually opening node_modules/react-native/scripts/launchPackager.command
opens Metro terminal but is not connected to the app
warn No apps connected. Sending "reload" to all React Native apps failed. Make sure your app is running in the simulator or on a phone connected via USB.
info Reloading app...
giving Terminal full disk access (no change)
This happened to me after upgrading to macOS Ventura. I happen to use iTerm as my main terminal, not the built-in Terminal.app so the following fix only applies to that scenario:
Set iTerm as the Default Handler for *.command Files
Open node_modules/react-native/scripts/ in Finder (open node_modules/react-native/scripts/)
Right-Click on launchPackager.command and click Open With then choose Other...
In your Applications directory, select iTerm and click Always Open With
After this, you might need to run npm run ios again from this terminal window. However, from now on, Metro will open in a new iTerm tab instead of trying to open the command in a new Terminal window.
For me, this was the desired behaviour and it removed this warning.
Note In future, any *.command files will now open with iTerm instead of Terminal.
I encountered the same problem as you, I installed another terminal (iTerm2), then randomly found a .command file, and in the display introduction, changed the default opening method to iTerm2enter image description here
I'm having this issue after upgrading my MacOS to Ventura 13.1.
If you don't want to use iTerm as the accepted answer suggest, the workaround I found was to look for the launchPackager.command file inside node-modules/react-native/scripts/ and open this file manually every time you run your app for the first time (specifically when the error pop-up appears). This will open the terminal with metro running already.
I know that manually processes are not the best, but I don't want to use iTerm :)
Using Intel version of apps (Webstorm, Android Studio, other IDE etc...) fixed my problems. I encountered the same issue and thanks to Intel version of Webstorm and Xcode on Rosetta I can able to pod install and other operations.
Note: I'm using Intel version of Android Studio, WebStorm. Also Xcode uses Rosetta 2. No problem detected and everything works perfect. I can able to develop React-Native & Native Android & iOS and Flutter apps without problem. Before that I was using Silicon version of WebStorm and almost no function worked.
Config: MacBook Air, macOS Ventura 13.2 on Apple M1 processor.
For Most of the case you just have to delete node_modules and install modules again (npm i). This happens when project was copied from old mac which had node_modules folder created by the old user, or if the system thinks so
This happened to me after i configured my terminal for the look and feel - but with iterm2, oh my zsh, and powerlevel10k

Expo-react-native :Couldn't adb reverse: device 'adb' not found

I am using react-native-expo for mobile app development.
I use an android emulator for the app, vscode editor for development.
It started showing me this error from few days.
› Opening on Android...
Couldn't adb reverse: device 'adb' not found
› Opening exp://10.0.46.81:19000 on Device adb
Couldn't start project on Android: Error running adb: device 'adb' not found
› Press ? │ show all commands
I tried wiping the emulator, tapping on the build number in the emulator, but nothing worked out.
I've deleted the virtual devices and created new one. It worked for one time and again this process isn't working.
there isn't much about this on the internet.
need help.
Just try this. It is work for me.
make sure you already add android sdk path in setting > appearance & behavior > system settings > android SDK > android SDK location
(Common path is C:\Users(name)\AppData\Local\Android\Sdk)
create new variable name and value in Environment Variables (User Variables)
(ANDROID_HOME C:\Users(name)\AppData\Local\Android\Sdk)
add new Path in Environment Variables (User Variables)
(C:\Users(name)\AppData\Local\Android\Sdk\platform-tools)
It is work for me after I have solved it for 3 hours.
At first, I don't face the problem like this in flutter but in react-native.
The fix for me was to install the SDK Platform for the android version used by the AVD.
In my case, I installed android v9 (Pie) via the AVD Manager when setting up my AVD for the first time, and when I looked into this issue I noticed that the SDK Platform for v9 was not installed as part of that setup.
The exact steps I took are as follows:
Disclaimer: You might not need to follow these steps exactly to resolve the issue
Close all CMD and IDE programs.
Open Android Studio and navigate to AVD Manager
Click the down arrow for the target AVD and click the Edit option
Set the device to Cold boot instead of Quick boot
Open SDK Manager, and download the SDK Platform for android version used by AVD
Go back to AVD Manager, click the Cold boot now option
Open a CMD terminal as administrator, CD to project repo, and run expo start
Launch expo in AVD
DONE
I had the same problem. Emulator started working after this:
Delete caches from Android Studio
Wipe data from your emulator
Cold boot to restart
When I was solving this problem I also ended up doing these:
Check Android studio updates
Reinstalled Android studio
Check SDK updates from SDK tools: SDK Manager -> Android SDK -> SDK tools. You can see if there is a new update available on the right.
Go to Virtual Device Manager -> Select your Device -> Actions -> Click "Drop down" button and select "Cold Boot Now".
This worked for me.
For my case, I went to the avd and simply clicked "wipe data", restarted both my avd and server and it worked
By my side the problem was is In Internet Connection. I just changed the WiFi and everything working fine.

AVD Manager: unable to locate adb in android studio

I'm just starting out my react track and thought of a little react-native app. Well, I installed Android Studio, the SDK and all that I needed according to https://reactnative.dev/docs/environment-setup, using the react-native CLI tab. But when I try to launch my emulator for any device on my list I get the error: AVD manager unable to locate adb. I have checked my %ANDROID_HOME% variable and it's set to the correct Sdk dir, I can use adb.exe inside the platform-tools dir with no apparent problem. But the AVD manager can't.
I even tried reinstalling Android SDK after deleting the platform-tools dir, or even installing a different version of it, but it just won't work!
Any thoughts on what is happening?
I struggled with this problem for a few days now and the number 1 suggestion I found is:
review your environment variables (such as %ANDROID_HOME%);
remove the platform-tools dir inside %ANDROID_HOME%, adb.exe is either corrupted or missing;
reinstall Android SDK and check for adb.exe inside %ANDROID_HOME%\platform-tools;
emulate a new device (you are a wizard Harry!);
Well, this didn't work for me but apparently worked for some people, especially for avast users (apparently it corrupts adb.exe 'cause it believes it to be malware).
What worked for me was:
In Android Studio go to File > Project Structure (Ctrl + Alt + Shift + S in windows);
Under Project Settings>Project>Project SDK must have a valid Android SDK selected;
emulate a new device (you are a wizard SadSack963!);

How can I restore missing "generate sample content" functionality for new Flutter projects in IntelliJ IDEA CE?

The ability of the "generate sample content" popup menu for a new Flutter project in IntelliJ IDEA seems to have disappeared on my installation. (It used to work until recently) (IntelliJ IDEA CE 2019.1.1 Build #IC-191.6707.61, Apr 16, 2019, on macOS 10.14.4)
When I click the checkbox to enable the popup menu, the menu is not populated - its just blank. I've re-installed IntelliJ IDEA, as well as run flutter doctor in the terminal (no errors from flutter doctor), but the popup menu remains empty.
Does anybody know how to get this menu to be re-populated?
I just had the same problem and I noticed that my Android SDK was not configured correctly in IntelliJ. After specifying the path to my SDK in IntelliJ's settings I can now use the "generate sample content" functionality.
Go to IntelliJ > Preferences > Appearance & Behaviour > System Settings > Android SDK and specify the Android SDK location. Presumed you've installed the Android SDK already, you'll find it on Mac OS by default at /Users/<user-name>/Library/Android/sdk and on Windows at C:\Users\<user-name>\AppData\Local\Android\sdk.
Make sure to update your IntelliJ version, Dart & Flutter plugin, Android SDK and run flutter doctor to check if everything is set up correctly.
Also checkout this issue, which describes the same problem.

Titanium appcelerator is capricious,

I face a big problem with titanium appcelerator, this morning i work as usual on my app dev, sundenly i am not able to run my project as this picture shows :
When i click on run i just have "Package" and iOs and android simulator are gone.
I tried rebooting the studio, my mac but nothing.
I use : Appcelerator Studio, build: 4.6.0.201605201934 and xcode Version 7.3.1 (7D1014)
Thanks for your help.
To steps you can try:
Did you try to run your project via CLI ?
Try to locate your sdk in Studio go to settings->platforms->set titanium sdk home (if it is already set, set it again)