Skip to content

.android folder in flutter module unexpectedly overwritten #28135

Closed

Description

@kongnanlive

flutter create -t module my_module

I edited pubspec.yaml once and used the package upgrade and package. As a result, all the code in my '.android' was overwritten and a new 'android' directory was generated.
Prompt me at runtime:

            No application found for TargetPlatform.android_arm64.
            Is your project missing an android\AndroidManifest.xml?
            Consider running "flutter create ." to create one.

Why is this happening? my code is lost.
Why is this happening? my code is lost.
Why is this happening? my code is lost.

flutter doctor -v

[√] Flutter (Channel stable, v1.0.0, on Microsoft Windows [Version 10.0.14393], locale zh-CN)
    • Flutter version 1.0.0 at D:\kongnan\flutter
    • Framework revision 5391447fae (3 months ago), 2018-11-29 19:41:26 -0800
    • Engine revision 7375a0f414
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[!] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at C:\Users\User\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-1136-b06)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[√] Android Studio (version 3.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[√] IntelliJ IDEA Community Edition (version 2018.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.1.5
    • Flutter plugin version 31.3.1
    • Dart plugin version 181.4892.1

[√] Connected device (2 available)
    • Mi Note 3 • 6454c8fb     • android-arm64 • Android 8.1.0 (API 27)
    • HTC One   • FA35FS906226 • android-arm   • Android 4.4.2 (API 19)

Activity

  1. added
    engineflutter/engine related. See also e: labels.
    a: existing-appsIntegration with existing apps via the add-to-app flow
    on Feb 19, 2019
  2. added this to the milestone on Feb 19, 2019
  3. xster commented on May 19, 2019

    @xster
    Member

    Can you describe your workflow a bit? What setup were you trying to achive via flutter create -t module? What edits were you making in the .android directory?

  4. changed the title [-]flutter create -t module my_module[/-] [+].android folder in flutter module overwritten[/+] on May 19, 2019
  5. changed the title [-].android folder in flutter module overwritten[/-] [+].android folder in flutter module unexpectedly overwritten[/+] on May 19, 2019
  6. xster commented on Nov 15, 2019

    @xster
    Member

    We might want to include a file in .android called DO_NOT_EDIT_THIS_AUTOGENERATED_FOLDER or something

  7. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    and removed
    engineflutter/engine related. See also e: labels.
    on Nov 15, 2019
  8. jmagman commented on Dec 19, 2019

    @jmagman
    Member

    You filed this first, but there's more information in duplicate #28135. Closing as duplicate.

  9. github-actions commented on Aug 14, 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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: existing-appsIntegration with existing apps via the add-to-app flowtoolAffects 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