Skip to content

flutter create failed - "Value was missing for variable tag: androidFlutterJar" #57985

Closed

Description

@johannes545

Steps to Reproduce

  1. ...so when im trying to start a flutter project i run into the problem that says i dont have androidflutterjar
  2. ...
  3. ...

Logs

![image](https://user-images.githubusercontent.com/65943941/82872802-d42ba500-9f33-11ea-8f22-f38511ac5cdc.png)

problem

Activity

  1. TahaTesser commented on May 26, 2020

    @TahaTesser
    Contributor

    Hi @johannes545
    can you please provide your flutter doctor -v and flutter run --verbose?
    Also, to better address the issue, would be helpful if you could post a minimal code sample to reproduce the problem
    Thank you

  2. added
    in triagePresently being triaged by the triage team
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on May 26, 2020
  3. johannes545 commented on May 27, 2020

    @johannes545
    Author

    hey, so im very new to programing, only done basic apps in android studio with less than 100 lines of code.

    so i dont know exactly how to adress it better. but il post the flutter doctor -v and the flutter run --verbose
    flutter doctor -v
    verbose1
    verbose2
    verbose3
    verbose4

  4. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on May 27, 2020
  5. TahaTesser commented on May 27, 2020

    @TahaTesser
    Contributor

    Hi @johannes545
    Can you please execute flutter create --verbose testapp from your desktop folder and copy/paste all the logs, don't create project in user folder?
    Thank you

  6. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on May 27, 2020
  7. johannes545 commented on May 27, 2020

    @johannes545
    Author
  8. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on May 27, 2020
  9. TahaTesser commented on May 27, 2020

    @TahaTesser
    Contributor

    Hi @johannes545
    Please refrain from posting pictures if not necessary.
    Please copy/paste all the logs

  10. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on May 27, 2020
  11. johannes545 commented on May 27, 2020

    @johannes545
    Author
    C:\Users\Johannes>flutter create appniel
    Creating project appniel...
      appniel\.gitignore (created)
      appniel\.idea\libraries\Dart_SDK.xml (created)
      appniel\.idea\libraries\Flutter_for_Android.xml (created)
    
    Oops; flutter has exited unexpectedly: "Value was missing for variable tag: androidFlutterJar. (4:24)
          <root url="jar://{{{androidFlutterJar}}}!/" />
                           ^
    ".
    
    A crash report has been written to C:\Users\Johannes\flutter_09.log.
    This crash may already be reported. Check GitHub for similar crashes.
    https://github.com/flutter/flutter/issues?q=is%3Aissue+Value+was+missing+for+variable+tag%3A+androidFlutterJar.+%284%3A24%29%0A++++++%3Croot+url%3D%22jar%3A%2F%2F%7B%7B%7BandroidFlutterJar%7D%7D%7D%21%2F%22+%2F%3E%0A+++++++++++++++++++++++%5E%0A
    
    To report your crash to the Flutter team, first read the guide to filing a bug.
    https://flutter.dev/docs/resources/bug-reports
    
    Create a new GitHub issue by pasting this link into your browser and completing the issue template. Thank you!
    https://git.io/JfrtT
    
    
    C:\Users\Johannes>flutter create --verbose testapp
    [  +13 ms] executing: [C:\src\flutter\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
    [ +133 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
    [   +3 ms] 2738a1148ba6c9a6114df62358109407c3ef2553
    [   +1 ms] executing: [C:\src\flutter\flutter/] git tag --contains HEAD
    [ +320 ms] Exit code 0 from: git tag --contains HEAD
    [   +2 ms] 1.18.0-11.1.pre
    [  +16 ms] executing: [C:\src\flutter\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
    [  +98 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
    [   +1 ms] origin/beta
    [        ] executing: [C:\src\flutter\flutter/] git ls-remote --get-url origin
    [  +97 ms] Exit code 0 from: git ls-remote --get-url origin
    [   +1 ms] https://github.com/flutter/flutter.git
    [ +157 ms] executing: [C:\src\flutter\flutter/] git rev-parse --abbrev-ref HEAD
    [ +102 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
    [   +2 ms] beta
    [  +99 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
    [   +1 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
    [   +9 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
    [  +55 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
    [   +1 ms] Artifact Instance of 'GradleWrapper' is not required, skipping update.
    [        ] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
    [        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
    [   +3 ms] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
    [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
    [        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
    [  +64 ms] Creating project testapp...
    [  +76 ms]   testapp\.gitignore (created)
    [  +21 ms]   testapp\.idea\libraries\Dart_SDK.xml (created)
    [  +18 ms]   testapp\.idea\libraries\Flutter_for_Android.xml (created)
    [  +20 ms] "flutter create" took 319ms.
    
    Oops; flutter has exited unexpectedly: "Value was missing for variable tag: androidFlutterJar. (4:24)
          <root url="jar://{{{androidFlutterJar}}}!/" />
                           ^
    ".
    [ +396 ms] executing: C:\src\android studio\jre\bin\java -version
    [ +415 ms] Exit code 0 from: C:\src\android studio\jre\bin\java -version
    [   +2 ms] openjdk version "1.8.0_212-release"
               OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
               OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)
    [  +29 ms] executing: C:\src\android studio\jre\bin\java -version
    [ +157 ms] Exit code 0 from: C:\src\android studio\jre\bin\java -version
    [   +2 ms] openjdk version "1.8.0_212-release"
               OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
               OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)
    [   +8 ms] executing: [C:\src\flutter\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%ar
    [ +104 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%ar
    [   +2 ms] 13 days ago
    [ +252 ms] executing: C:\Users\Johannes\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l
    |[ +155 ms] List of devices attached
    [   +6 ms] executing: C:\Users\Johannes\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l
    [  +42 ms] executing: C:\Users\Johannes\AppData\Local\Android\sdk\cmdline-tools\latest\bin\sdkmanager.bat --licenses   /[  +42 ms] List of devices attached
    A crash report has been written to C:\Users\Johannes\flutter_10.log.
    This crash may already be reported. Check GitHub for similar crashes.
    https://github.com/flutter/flutter/issues?q=is%3Aissue+Value+was+missing+for+variable+tag%3A+androidFlutterJar.+%284%3A24%29%0A++++++%3Croot+url%3D%22jar%3A%2F%2F%7B%7B%7BandroidFlutterJar%7D%7D%7D%21%2F%22+%2F%3E%0A+++++++++++++++++++++++%5E%0A
    ``
    
    To report your crash to the Flutter team, first read the guide to filing a bug.
    https://flutter.dev/docs/resources/bug-reports
    
    Create a new GitHub issue by pasting this link into your browser and completing the issue template. Thank you!
    https://git.io/Jfr3i
    
    alright this is the text
    
  12. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on May 27, 2020
  13. removed
    in triagePresently being triaged by the triage team
    on May 28, 2020
  14. changed the title [-]missing androidflutterjar[/-] [+]flutter create failed - "Value was missing for variable tag: androidFlutterJar"[/+] on May 28, 2020
  15. added
    c: crashStack traces logged to the console
    toolAffects the "flutter" command-line tool. See also t: labels.
    on May 28, 2020
  16. jmagman commented on Jun 16, 2020

    @jmagman
    Member

    androidFlutterJar was removed from the template in #55353. packages/flutter_tools/templates/app/.idea/libraries/Flutter_for_Android.xml.tmpl was removed from the template, but the .gitignore has .idea so the files aren't actually being removed on upgrade.

    Workaround is to delete the following files from your Flutter install location:

    packages/flutter_tools/templates/app/.idea/libraries/Flutter_for_Android.xml.tmpl
    packages/flutter_tools/templates/module/common/.idea/libraries/Flutter_for_Android.xml.tmpl
    packages/flutter_tools/templates/plugin/.idea/libraries/Flutter_for_Android.xml.tmpl

  17. added
    P1High-priority issues at the top of the work list
    on Jun 16, 2020
  18. jonahwilliams commented on Jun 26, 2020

    @jonahwilliams
    Contributor

    Fixed via #59706

  19. github-actions commented on Aug 19, 2021

    @github-actions

    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.

  20. locked as resolved and limited conversation to collaborators on Aug 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listc: crashStack traces logged to the consoletoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions