Repository navigation
.android folder in flutter module unexpectedly overwritten #28135
Copy link
Copy link
Closed
Labels
a: existing-appsIntegration with existing apps via the add-to-app flowIntegration with existing apps via the add-to-app flowtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Description
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)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
a: existing-appsIntegration with existing apps via the add-to-app flowIntegration with existing apps via the add-to-app flowtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Activity
xster commentedon May 19, 2019
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?
[-]flutter create -t module my_module[/-][+].android folder in flutter module overwritten[/+][-].android folder in flutter module overwritten[/-][+].android folder in flutter module unexpectedly overwritten[/+]xster commentedon Nov 15, 2019
We might want to include a file in .android called DO_NOT_EDIT_THIS_AUTOGENERATED_FOLDER or something
jmagman commentedon Dec 19, 2019
You filed this first, but there's more information in duplicate #28135. Closing as duplicate.
github-actions commentedon Aug 14, 2021
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 -vand a minimal reproduction of the issue.