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
Tool can't parse version of Android Studio Preview on macOS #121925
Comments
Hello @ti4n1993. This may be because you're using a preview version of Android Studio. Can you confirm if it's working as expected on the stable Eel version? |
@exaby73 I have tested on Electric Eel, it works as expect. Is there any plan to support canary version of Android Studio |
@ti4n1993 I cannot be certain right now. Since this is a relatively new version, and the teams efforts are currently on features announced in Flutter Forward, it's hard to say. Keep in mind, that this may also be an issue with Android Studio itself since it is a canary version :) I'll try to reproduce this tomorrow as it will take some time for me to install the new version and make sure my config is correct. If I do reproduce it, I'll label this issue so that the team can look at it ad provide some insights I may not have |
Hello @ti4n1993. Seems I cannot reproduce this issue. [✓] Android Studio (version 2022.3)
• Android Studio at /home/exabyt3/programs/android-studio-preview
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) |
I think this is a variation on #121468. In the original log, the tool is failing to identify the version of Android Studio:
If it had identified the version, it would print the version, as it did in the log at #121925 (comment) :
(That should probably be made more explicit in the output — it's pretty subtle, and the information would be helpful in debugging. → Filed #122081.) Then once it does fail to identify the Android Studio version, it treats the Android Studio install as if it were of an ancient version, in the same way as in #121468. That defeats the fix for #106674, causing the symptom seen here. So the new question in this issue is why the tool can't identify the Android Studio version. Based on the code at |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>ipr</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>studio.icns</string>
<key>CFBundleTypeName</key>
<string>Android Studio Project File</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>*</string>
</array>
<key>CFBundleTypeName</key>
<string>All documents</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>****</string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSTypeIsPackage</key>
<false/>
</dict>
</array>
<key>CFBundleExecutable</key>
<string>studio</string>
<key>CFBundleIconFile</key>
<string>studio.icns</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Android Studio</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleIdentifier</key>
<string>com.google.android.studio-EAP</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleGetInfoString</key>
<string>Android Studio EAP AI-223.8617.56.2231.9644228, build AI-223.8617.56.2231.9644228. Copyright JetBrains s.r.o., (c) 2000-2023</string>
<key>CFBundleShortVersionString</key>
<string>EAP AI-223.8617.56.2231.9644228</string>
<key>CFBundleVersion</key>
<string>AI-223.8617.56.2231.9644228</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>Stacktrace</string>
<key>CFBundleURLSchemes</key>
<array>
<string>idea</string>
</array>
</dict>
</array>
<key>LSApplicationCategoryType</key>
<string>public.app-category.developer-tools</string>
<key>LSArchitecturePriority</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>LSRequiresNativeExecution</key>
<string>YES</string>
<key>LSMinimumSystemVersion</key>
<string>10.8</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
<key>JVMOptions</key>
<dict>
<key>ClassPath</key>
<string>$APP_PACKAGE/Contents/lib/util.jar:$APP_PACKAGE/Contents/lib/app.jar:$APP_PACKAGE/Contents/lib/3rd-party-rt.jar:$APP_PACKAGE/Contents/lib/platform-statistics-devkit.jar:$APP_PACKAGE/Contents/lib/jps-model.jar:$APP_PACKAGE/Contents/lib/stats.jar:$APP_PACKAGE/Contents/lib/protobuf.jar:$APP_PACKAGE/Contents/lib/external-system-rt.jar:$APP_PACKAGE/Contents/lib/forms_rt.jar:$APP_PACKAGE/Contents/lib/intellij-test-discovery.jar:$APP_PACKAGE/Contents/lib/annotations.jar:$APP_PACKAGE/Contents/lib/groovy.jar:$APP_PACKAGE/Contents/lib/3rd-party-native.jar:$APP_PACKAGE/Contents/lib/annotations-java5.jar:$APP_PACKAGE/Contents/lib/byte-buddy-agent.jar:$APP_PACKAGE/Contents/lib/error-prone-annotations.jar:$APP_PACKAGE/Contents/lib/externalProcess-rt.jar:$APP_PACKAGE/Contents/lib/idea_rt.jar:$APP_PACKAGE/Contents/lib/intellij-coverage-agent-1.0.682.jar:$APP_PACKAGE/Contents/lib/junit.jar:$APP_PACKAGE/Contents/lib/junit4.jar:$APP_PACKAGE/Contents/lib/platform-objectSerializer-annotations.jar:$APP_PACKAGE/Contents/lib/rd.jar:$APP_PACKAGE/Contents/lib/resources.jar:$APP_PACKAGE/Contents/lib/util_rt.jar:$APP_PACKAGE/Contents/lib/ant/lib/ant.jar</string>
<key>JVMVersion</key>
<string>1.8*,1.8+</string>
<key>MainClass</key>
<string>com/intellij/idea/Main</string>
<key>Options</key>
<array>
<string>-XX:FlightRecorderOptions=stackdepth=256</string>
<string>--add-opens=java.base/java.io=ALL-UNNAMED</string>
<string>--add-opens=java.base/java.lang=ALL-UNNAMED</string>
<string>--add-opens=java.base/java.lang.ref=ALL-UNNAMED</string>
<string>--add-opens=java.base/java.lang.reflect=ALL-UNNAMED</string>
<string>--add-opens=java.base/java.net=ALL-UNNAMED</string>
<string>--add-opens=java.base/java.nio=ALL-UNNAMED</string>
<string>--add-opens=java.base/java.nio.charset=ALL-UNNAMED</string>
<string>--add-opens=java.base/java.text=ALL-UNNAMED</string>
<string>--add-opens=java.base/java.time=ALL-UNNAMED</string>
<string>--add-opens=java.base/java.util=ALL-UNNAMED</string>
<string>--add-opens=java.base/java.util.concurrent=ALL-UNNAMED</string>
<string>--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED</string>
<string>--add-opens=java.base/jdk.internal.vm=ALL-UNNAMED</string>
<string>--add-opens=java.base/sun.nio.ch=ALL-UNNAMED</string>
<string>--add-opens=java.base/sun.nio.fs=ALL-UNNAMED</string>
<string>--add-opens=java.base/sun.security.ssl=ALL-UNNAMED</string>
<string>--add-opens=java.base/sun.security.util=ALL-UNNAMED</string>
<string>--add-opens=java.desktop/com.apple.eawt=ALL-UNNAMED</string>
<string>--add-opens=java.desktop/com.apple.eawt.event=ALL-UNNAMED</string>
<string>--add-opens=java.desktop/com.apple.laf=ALL-UNNAMED</string>
<string>--add-opens=java.desktop/java.awt=ALL-UNNAMED</string>
<string>--add-opens=java.desktop/java.awt.dnd.peer=ALL-UNNAMED</string>
<string>--add-opens=java.desktop/java.awt.event=ALL-UNNAMED</string>
<string>--add-opens=java.desktop/java.awt.image=ALL-UNNAMED</string>
<string>--add-opens=java.desktop/java.awt.peer=ALL-UNNAMED</string>
<string>--add-opens=java.desktop/java.awt.font=ALL-UNNAMED</string>
<string>--add-opens=java.desktop/javax.swing=ALL-UNNAMED</string>
<string>--add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED</string>
<string>--add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED</string>
<string>--add-opens=java.desktop/sun.awt.datatransfer=ALL-UNNAMED</string>
<string>--add-opens=java.desktop/sun.awt.image=ALL-UNNAMED</string>
<string>--add-opens=java.desktop/sun.awt=ALL-UNNAMED</string>
<string>--add-opens=java.desktop/sun.font=ALL-UNNAMED</string>
<string>--add-opens=java.desktop/sun.java2d=ALL-UNNAMED</string>
<string>--add-opens=java.desktop/sun.lwawt=ALL-UNNAMED</string>
<string>--add-opens=java.desktop/sun.lwawt.macosx=ALL-UNNAMED</string>
<string>--add-opens=java.desktop/sun.swing=ALL-UNNAMED</string>
<string>--add-opens=jdk.attach/sun.tools.attach=ALL-UNNAMED</string>
<string>--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</string>
<string>--add-opens=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED</string>
<string>--add-opens=jdk.jdi/com.sun.tools.jdi=ALL-UNNAMED</string>
</array>
<key>Properties</key>
<dict>
<key>java.system.class.loader</key>
<string>com.intellij.util.lang.PathClassLoader</string>
<key>idea.vendor.name</key>
<string>Google</string>
<key>idea.paths.selector</key>
<string>AndroidStudioPreview2022.3</string>
<key>jna.boot.library.path</key>
<string>$APP_PACKAGE/Contents/lib/jna/aarch64</string>
<key>pty4j.preferred.native.folder</key>
<string>$APP_PACKAGE/Contents/lib/pty4j</string>
<key>jna.nosys</key>
<string>true</string>
<key>jna.noclasspath</key>
<string>true</string>
<key>idea.platform.prefix</key>
<string>AndroidStudio</string>
<key>splash</key>
<string>true</string>
<key>idea.executable</key>
<string>studio</string>
<key>idea.home.path</key>
<string>$APP_PACKAGE/Contents</string>
</dict>
</dict>
<key>NSCameraUsageDescription</key>
<string>An application in Android Studio requests access to the device's camera.</string>
<key>NSMicrophoneUsageDescription</key>
<string>An application in Android Studio requests access to the device's microphone.</string>
<key>NSLocationUsageDescription</key>
<string>An application in Android Studio requests access to the user's location information.</string>
<key>NSDesktopFolderUsageDescription</key>
<string>An application in Android Studio requests access to the user's Desktop folder.</string>
<key>NSDocumentsFolderUsageDescription</key>
<string>An application in Android Studio requests access to the user's Documents folder.</string>
<key>NSDownloadsFolderUsageDescription</key>
<string>An application in Android Studio requests access to the user's Downloads folder.</string>
<key>NSNetworkVolumesUsageDescription</key>
<string>An application in Android Studio requests access to files on a network volume.</string>
<key>NSRemovableVolumesUsageDescription</key>
<string>An application in Android Studio requests access to files on a removable volume.</string>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>An application in Android Studio requests access to Bluetooth.</string>
<key>NSAppleEventsUsageDescription</key>
<string>An application in Android Studio requests the ability to send Apple events.</string>
</dict>
</plist> |
Great, that explains it:
We try to match that version string static final RegExp versionPattern =
RegExp(r'^(\d+)(\.(\d+)(\.(\d+))?)?'); which indeed doesn't match. For comparison, here's what it looks like on the Android Studio install I have lying around on a Mac:
So that's the sort of string that the pattern was written for. |
I don't see anything in that
as it does on the Dolphin install I have lying around:
so there's some hope it might be stable. In that version string, the part after "AI-" seems to encode the major and minor version: "AI-YYN.*" means Android Studio 20YY.N. That pattern has held since the introduction of the "Android Studio 20YY.N" version numbers a couple of years ago: Alternatively, we could stop looking for a version in the format 20YY.N and try to take the AI-223.etc.etc. string directly, if that's the form Android Studio wants to describe its version in. That would probably require some more refactoring, though. |
Will let the tools team set the priority for this @christopherfujino |
Issue filed against the Android Studio team since the value we are seeing is an illegalValue according to apple. https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring "This key is a user-visible string for the version of the bundle. The required format is three period-separated integers, such as 10.14.1. The string can only contain numeric characters (0-9) and periods." |
Android studio rejected the bug against them. Here are the onboarding docs I think I will have to write a unit test for them https://g3doc.corp.google.com/company/teams/android-studio/development/index.md?cl=head. FWIW this value was also broken on the flamingo version until canary. |
folders to look in |
@andrewkolos I ran
|
Hey, hope you're doing well. Any updates on this? I'm facing this issue on Debian 12
I've tried with the following versions:
But I'm still getting the same error. |
@paoloose, this issue should only affect you if you are running a Preview version of Android Studio. If you are encountering this on release (non-Preview) versions, please file a new issue and tag me. I would be happy to assist. |
This "✗ Unable to determine Android Studio version." is preventing work on Android Studio Hedgehog | 2023.1.1 Build #AI-231.9392.1.2311.11076708, built on November 9, 2023 on Kubuntu 22.04. Claims to be the very latest version. I had a fully working environment, agreed to update and am now stuck. Not a great experience, makes you wonder if Android Studio and Flutter is such a great tool after all. Especially since I have had similar sudden trouble before with flutter, and this bug seems to go back a long time. Some thread was closed because "works on windows". Well, who develops on windows in 2023? Ridiculous. This breaking after update certainly does makes you think of windows. |
@jockeF This should not be blocking you from doing any actual flutter development. If you know you have Android Studio installed, you can feel free to ignore the diagnostic. If the red x really bothers you, we would welcome a pull request to fix it :) |
Same issue with Ubuntu 24.04 LTS and install Android Studio from Adroid Studio version: flutter doctor -v
|
This issue can also be seen with
but the output of flutter doctor still shows being unable to determine android studio version
|
Is there an existing issue for this?
Steps to reproduce
Using the Android Studio Giraffe Canary 7 and the latest master channel flutter
Actual results
Flutter doctor is still saying unable to find bundled java
Logs
Logs
<!-- Paste your logs here -->
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: