_From @darrellpf on April 30, 2017 1:37_
Make a new flutter project
Intellij says frameworks detected
[✓] Flutter (on Linux, channel master)
• Flutter at /home/darrell/flutter
• Framework revision a4ba761bea (26 hours ago), 2017-04-28 16:01:14 -0700
• Engine revision da8ebf40bd
• Tools Dart version 1.23.0-dev.11.11
[✓] Host Executable Compatibility
• Downloaded executables execute on host
[✓] Android toolchain - develop for Android devices (Android SDK 25.0.2)
• Android SDK at /home/darrell/Android/Sdk
• Platform android-25, build-tools 25.0.2
• Java binary at: /home/darrell/android-studio/jre/bin/java
• Java version: OpenJDK Runtime Environment (build 1.8.0_112-release-b736)
[✓] Android Studio (version 2.4)
• Android Studio at /home/darrell/android-studio
• Gradle version 3.4.1
• Java version: OpenJDK Runtime Environment (build 1.8.0_112-release-b736)
[✓] IntelliJ IDEA Community Edition (version 2017.1)
• Dart plugin version 171.4424.10
• Flutter plugin version 13.0
[✓] Connected devices
• None
For more information about diagnosing and reporting Flutter bugs, please see https://flutter.io/bug-reports/.
_Copied from original issue: flutter/flutter#9691_
_From @eseidelGoogle on May 1, 2017 15:43_
@devoncarew would know.
_From @eseidelGoogle on May 1, 2017 15:44_
Could you give me more information on what parts don't work? Is it the Android/Java integration in IntelliJ? Or when you hit the Run button it doesn't run on the attached device? Something else?
_From @darrellpf on May 1, 2017 16:7_
Intellij Android/Java integration is broken.
When a new project is made Intellij does detect that an Android facet it required. The event log says
5/1/17
8:56 AM Frameworks detected: Android framework is detected in the project Configure
Clicking Configure brings up a "Setup Frameworks" dialog.

with Android and AndroidManfest.xml checked. Selecting AndroidManifest.xml puts a message in the bottom of the dialog saying
Andriod facet will be added to the "Andoid Module". Clicking OK in the dialog results in a presumably workable project.
Clicking "Build Project" at the top of the IDE results in
Error:Android Source Generator: [android] AndroidManifest.xml file not found
Opening the project structure dialog shows that an Android module SDK has been chosen.
Since the project fails to build at all the Run button is not highlighted.
_From @devoncarew on May 1, 2017 23:32_
Adding @skybrian for general expertise on our Android source support.
Since the project fails to build at all the Run button is not highlighted.
This issue is likely orthogonal - Flutter projects don't use or need the the build support from Build Project. The run button should be enabled if you have a flutter launch configuration selected in the pulldown (all flutter projects should at least have one for main.dart), and a device connected and detected. W/ this bit at the end of flutter doctor: [✓] Connected devices • None, the run button should become enabled once you connect a device.
_From @skybrian on May 2, 2017 2:7_
Confirmed that "Build Project" results in that error. Apparently IDEA's Android integration expects the manifest file to be at module root, but it's actually in android/app/src/main.
(Building the project does work if you don't enable Android framework, but it only compiles the Java files to .class files.)
I tried removing the "android" module and importing android/app/src/main into IDEA as an Android module. It gets further but doesn't know where to find the Flutter classes.
_From @devoncarew on May 2, 2017 14:22_
I'm splitting the run-button-not-enabled issue out into https://github.com/flutter/flutter-intellij/issues/971.
What's left in this issue is that Build Project doesn't work, which seems related to our choice of where we put the manifest file. /cc @jakobr-google, @mit-mit to see if we can re-locate where that file is.
@devoncarew can you elaborate? We put androidmanifest.xml in src/main, which is the same location the file is located when you create a new project in Android Studio.
_From @devoncarew on May 2, 2017 14:31_
From @skybrian's comment above, which says that Build Project is looking in the module root.
_From @skybrian on May 2, 2017 17:24_
Maybe we need to set the module root differently. I'll take a look.
_From @skybrian on May 3, 2017 0:39_
I found a way to get it to build:
Now it should build the apk.
However, Android Integration automatically creates an "android" run configuration, and if I attempt to run that, it fails. I see:
05/02 17:31:17: Launching android
$ adb push /Users/skybrian/tmp/click6/out/production/android/android.apk /data/local/tmp/com.yourcompany.click6
$ adb shell pm install -r "/data/local/tmp/com.yourcompany.click6"
Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]
So I'm not sure if we want to lead users in this direction? Do we even want to support Android integration when it's going to bypass "flutter run" and hot reload, and do its own thing?
_From @skybrian on May 3, 2017 0:41_
I wonder if there's some way to suppress this notice in the event log:
Frameworks detected: Android framework is detected in the project
_From @devoncarew on May 3, 2017 15:44_
If we want, we can suppress that by writing out the correct preferences:

_From @eseidelGoogle on May 3, 2017 16:21_
Triaging bugs, looks like skybrian looked at this. Not sure if this belongs in flutter/flutter or flutter-intellij. Marking M5 for now, please feel free to adjust.
Behavior hasn't changed when testing with M15.
(Unassigned since I'll be on leave.)
This problem is not resolve now.

1、AndroidManifest.xml file not found on build project
2、resource is not found
For anyone looking for a workaround, this is what worked for me:
File > Project Structure > Modules > Android > Structure
Change Manifest file from:
C:\Users\username\IdeaProjects\myapp\android\AndroidManifest.xml
To:
C:\Users\username\IdeaProjects\myapp\android\app\src\main\AndroidManifest.xml
fyi @mravn-google, can you check if the manifest file needs to be moved as you look at the Android Studio 3.0 templates?
@mit-mit In a new Android project created by Android Studio 3.0.1, the manifest file is placed in my_project/app/src/main/AndroidManifest.xml. The app.iml file contains the following:
<facet type="android" name="Android">
<configuration>
...
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
...
</configuration>
</facet>
buen dia amigos soy nueva en programacion de android y tengo el siguiente error: Error:El prefijo "android" para el atributo "android:allowBackup" asociado a un tipo de elemento "application" no está enlazado. esto en el AndroidMan

ifest.xml favor una ayudita¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
Having the similar issues. I'm using AndroidStudio 3.2.1
I've created an issue on the main flutter thread : - https://github.com/flutter/flutter/issues/25734
It seems like the AndroidManifest.xml file is not in sync with app/build.gradle
FWIW I am getting this issue all the time even today (2019-09) with everything (Flutter, IntelliJ) up to date. Both "Run" and "Debug" work, and clearly they are doing their thing to build the project, but menu "Build" -> Build project and "Build" -> Rebuild project fail.
Most helpful comment
For anyone looking for a workaround, this is what worked for me:
File > Project Structure > Modules > Android > StructureChange
Manifest filefrom:C:\Users\username\IdeaProjects\myapp\android\AndroidManifest.xmlTo:
C:\Users\username\IdeaProjects\myapp\android\app\src\main\AndroidManifest.xml