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

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.

Related

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.

Android Studio no syntax highlighting

Okay, I've wanted to give React Native a try, did a fresh install of Android Studio 4.1.1 on my Ubuntu 19.10, bootstrapped a simple project via react-native CLI, opened it and instantly noticed that JSX highlighting is broken, google around, but the only thing I found is this link -
https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000161950-JSX-Syntax-Highlighting-not-working
Tried to reboot, to create a new project from scratch, I did not load my PyCharm settings when installed Android Studio, have not installed any plugins yet. So yeah - any ideas how do I get my highlighting working?
UPD: code navigation also seems to be broken. May be I need to try other version of Android Studio...
UPD 2: Tried Expo with Typescript project setup, studio asked to install a plugins that supports tsx, then restarted and now even the comments are not supported lol.
Note that Android Studio does not have support for JavaScript. You may want to try IntelliJ IDEA Ultimate Edition or WebStorm if you do not need to work with Java.

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

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"

How to get access to logcat in IntelliJ IDEA in non-Android project?

I don't see it at the bottom where it usually sits. I also tried "Log Viewer" plugin which should display logcat from any project, but that plugin fails to detect my emulated device.
I mean IntelliJ IDEA, not Android Studio.
Set
Gdx.app.setLogLevel(Application.LOG_INFO);
in your create() class, the log will be shown in the "Run Window".

Unable to Config Android sdk in Mobile First Foundation 7.1

I am working on hybrid Apps over IBM Mobile First Foundation on eclipse,I want to build an android app of the project, but when i configure the android SDK location and click on apply, nothing happens
Help!
The question is not clear enough... what are you applying? where? are you getting any errors, if yes, what are they?
When using MobileFirst Studio in Eclipse, the Android project can be generated in two ways.
By using the Google ADT tools.
Install the Eclipse plug-in and re-build the project by right-clicking the application folder and selecting Run As > Run on MobileFirst Development Server
By providing the path to Android Studio.
First install Android Studio and then, in Eclipse, navigate to File > Preferences > MobileFirst. Provide the path to the folder containing the executable. For example in Mac OS X that would be /Applications.
Then right-click on the Android environment folder and select Run As > Android Studio project.
Note: be sure not to convert the project to Gradle structure - this is currently not supported.