Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Studio - generate sample content menu is empty #31916

Closed
vvinogradsky opened this issue May 1, 2019 · 38 comments
Closed

Android Studio - generate sample content menu is empty #31916

vvinogradsky opened this issue May 1, 2019 · 38 comments

Comments

@vvinogradsky
Copy link

I am having some weird issues with Android Studio on one of my development machines (works fine on the other two). The particular issue that I am having is that none of predefined sample applications show up in the Sample Application drop-down when I choose to start a new project:

image

Flutter Doctor doesn't find any issues. Not sure if I should try and re-install?

@andyjwalker
Copy link

Hi - I have the same problem. I am following a course from London App Brewery.

@vvinogradsky
Copy link
Author

It appears sample content is not available yet if you are on the stable channel for Flutter SDK. Gotta be on beta or dev channel to receive this feature, or wait for the next stable release.

@sumithpdd
Copy link

Any work arounds?

@vvinogradsky
Copy link
Author

Apparently not, the code which supports this feature is not yet on the stable channel. As I mentioned above, one option is switching to the beta channel, however this could lead to other unexpected surprises.

@wizkard
Copy link

wizkard commented May 7, 2019

Same thing here... empty dropdown, wondering if it is yesterday's update that has issues

@vvinogradsky
Copy link
Author

As far as I can tell, the update didn't include Flutter SDK. Run Flutter Doctor to check the SDK version you are on:

image

According to Flutter developers, the minimum supporting SDK for this feature is 1.3.10, and it hasn't made it to the stable channel yet.

@vvinogradsky
Copy link
Author

Today Android Studio told me a new update is available. Now Flutter is at v1.5.4-hotfix.2 and the sample content is available:

image

Yeay!

@dilipagheda
Copy link

dilipagheda commented May 9, 2019

I have the same issue. I am using macOS Mojave 10.14.4. I tried both latest stable build and beta build which was published as a hotfix on 8/5/2019. And unable to see this samples menu options.

@crigigal
Copy link

crigigal commented May 9, 2019

@vvinogradsky what operative system do you have? I have just intalled the update and nothing changed for me...

@vvinogradsky
Copy link
Author

I am on Windows 7.

@DavidPowersExpiwrite
Copy link

Try running flutter doctor to re-register your current flutter SDK install with your current Android Studio install.

@vvinogradsky
Copy link
Author

I should have mentioned - the latest update gave me a bit of a trouble. The updater went into a loop complaining about a locked file. I closed Android Studio, tried restarting, but apparently a dart.exe process got stuck, so I had to kill it via Task Manager. After that I was able to restart Android Studio and then it went through upgrade steps start to finish. This happened on both of my machines, so I doubt that was a random glitch.

Perhaps you are not seeing the menu because your update also got stuck somewhere? Definitely try flutter doctor.

@ottod
Copy link

ottod commented May 11, 2019

I was certain that yesterday the sample content worked but not today, with no upgrades in between. So I tested and I found that if I created a new Flutter project when the full IDE was on screen (not just the Welcome to Android Studio) the options did appear, while when creating it thru the Welcome screen they did not. Until I found this, the sample content did not appear for a full day. It seems something gets refreshed when the IDE is fully started but does not when just the Welcome screen is shown.
Just a theory.

@skaterdude
Copy link

I have this problem on Win 7 with latest stable release. Doesn't matter if I go from full ide or welcome screen. Why put it on the menu (without comment or notation) if the underlying code that's required is not there?
Also following the App Brewery course, which is based upon an earlier release. Odd that the code was in and apparently worked in the older release. Maybe something changed about the way the sample code is accessed? Think I saw a closed issue alluding to this.

@PracticalCode
Copy link

I just recently updated to:

  • Flutter (Channel beta, v1.5.4-hotfix.2, on Microsoft Windows [Version 10.0.17134.706], locale en-US)
    ... but after the update was complete & I went to start a new Flutter project, the dropdown was empty; all it took was completely closing Android Studio (after the update was complete) & then relaunching it.

@merlinbergmann
Copy link

Had the error on Mac,

  1. Ran flutter doctor - 1.5.4-hotfix.2 version was already installed - no issues found
  2. closed Android Studio completely
  3. launched it again and TADA - sample content is available.

@skaterdude
Copy link

Reloading doesn't fix it for me on Win 7.

Here's Doctor output. Also, when I ran the AS update check it updated to a new build (even though I just installed it a week ago).

[√] Flutter (Channel stable, v1.5.4-hotfix.2, on Microsoft Windows [Version 6.1.7601], locale en-US)
• Flutter version 1.5.4-hotfix.2 at F:\src\flutter\flutter
• Framework revision 7a4c334 (2 weeks ago), 2019-04-29 11:05:24 -0700
• Engine revision 52c7a1e
• Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)

[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at C:\Users\Skaterdude\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
• All Android licenses accepted.

[√] Android Studio (version 3.4)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 35.3.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[!] Connected device
! No devices available

! Doctor found issues in 1 category.
Process finished with exit code 0

StudioUpdate

@erfanasg
Copy link

guys i had the same problem in 1.5.4 hotfix stable 2...

i installed the material theme ui from the plugins and now it looks like i almost resolved the problem

i didnt find out this problem to be related to stable version of flutter

@Nonijosh
Copy link

Today Android Studio told me a new update is available. Now Flutter is at v1.5.4-hotfix.2 and the sample content is available:

image

Yeay!

Please, any workaround on ubuntu os. I'm on version 1.5.4-hotfix.2 and still, the sample content box is empty

@pandeyvineet
Copy link

pandeyvineet commented May 19, 2019

Updated Android studio ,changed channels from stable to dev,beta and then upgraded flutter but
"Generate sample content" is still empty

@yadav-sachin
Copy link

yadav-sachin commented May 27, 2019

I faced the same issue, I tried downloading flutter SDK again, but the same error. Finally, it got resolved when I reinstalled the flutter and dart plugins in android studio.
**PS:**When I started with a new project, the same problem appears again, "Generate sample content " is empty.

@hamhanry
Copy link

I faced the same issue, I tried downloading flutter SDK again, but the same error. Finally, it got resolved when I reinstalled the flutter and dart plugins in android studio.
**PS:**When I started with a new project, the same problem appears again, "Generate sample content " is empty.

This solve my problem. thanks

@cntoss
Copy link

cntoss commented Jun 3, 2019

i have a same problem .There is installed flutter and dart plugins in android studio but when i check in cmd as flutter doctor i found:
IntelliJ IDEA Community Edition (version 2018.3)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.

@subwaymatch
Copy link

I was also having a same issue. I've reinstalled both the SDK and Android Studio plugins for Flutter and Dart and the sample content menu showed up. I'm not sure which one (reinstalling plugins or SDK) fixed it for me. flutter doctor didn't throw any message when the issue happened.

image

OS: Windows 10
Android Studio Version: Version 3.4.1
Flutter Version: Channel Beta, v1.6.3

@FabioPagano
Copy link

FabioPagano commented Jun 5, 2019

I have solved like "ottod" said, which means to create the new flutter project from an already opened ide code editor through "File / New / New Flutter project" and not through the initial welcome screen.

@devoncarew
Copy link
Member

I believe this should have been addressed by the most recent (M36) release of the Flutter IntelliJ plugin. For people that are still experiencing this, I'd check to see if there are new updates to the plugin version you have installed.

@skaterdude
Copy link

Oh look, it's fixed in today's update! (I checked it)

Now adb.exe crashes and prevents me from running my project. :(

@subwaymatch
Copy link

Oh look, it's fixed in today's update! (I checked it)

Now adb.exe crashes and prevents me from running my project. :(

Did you update Android SDK in Android Studio by any chance? This is a new issue that's not related to the Flutter plugin. Check #33938 to see if it's identical to your issue by any chance.

@janlaubscher
Copy link

Followed ottod's advice, create new project inside the IDE, and it works. Thanks to ottod

@zkyll
Copy link

zkyll commented Jun 15, 2019

I just had this problem today. My version is 1.5.4-hotfix.2. flutter doctor (no issues found), flutter upgrade, created project inside ide and not in the welcome screen, all of these didn't work for me.

The last thing i tried: went to settings -> build, execution, deployment -> build tools -> gradle and unchecked Offline work. Solved!

@janlaubscher
Copy link

janlaubscher commented Jun 15, 2019 via email

@amansharma44007
Copy link

I was also in the problem of generating sample context, so what I did was simply updated my plugin and restart and boom it appears. And if it also not working then check your SDK and version of flutter SDK and android studio. Jai Hind

@debosmit-git
Copy link

flutter1
I guess I'm on the latest of everything, yet facing the issue. Please Help!

@nickrobinson
Copy link

I was able to fix this issue locally by taking the following steps:

  1. Uninstall the Flutter Plugin from Android Studio and restart the IDE
  2. Navigate to the Archived Versions of the Flutter Plugin and download 34.0.2
  3. In Android Studio navigate to Preferences -> Plugins -> Settings -> Install Plugin from Disk and install the downloaded version of the Flutter Plugin
  4. Restart Android Studio
  5. Profit 💰

@VinaySC
Copy link

VinaySC commented Jul 6, 2019

I reinstalled the Flutter SDK and Android Studio and I don't see the "Generate Sample Content" option anymore.

What in the world happened?

image

@VinaySC
Copy link

VinaySC commented Jul 6, 2019

I was able to fix this issue locally by taking the following steps:

  1. Uninstall the Flutter Plugin from Android Studio and restart the IDE
  2. Navigate to the Archived Versions of the Flutter Plugin and download 34.0.2
  3. In Android Studio navigate to Preferences -> Plugins -> Settings -> Install Plugin from Disk and install the downloaded version of the Flutter Plugin
  4. Restart Android Studio
  5. Profit 💰

This works

@devoncarew
Copy link
Member

devoncarew commented Jul 7, 2019

I reinstalled the Flutter SDK and Android Studio and I don't see the "Generate Sample Content" option anymore.

What in the world happened?

We've since removed the option from the project creation dialog - people should generally start new projects with the ~4 main templates from flutter create. The samples are good for exploring specific snippets of code - you can still create them from the individual package:flutter libraries (material/scaffold.dart, ...).

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests