Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No application found for TargetPlatform.android_x86

This's my first flutter App and for some reason the Android launcher icon stopped showing so I was trying to fix that, I did a bunch of things and ended up with this error.

  • flutter doctor shows everything is fine.
  • ios version builds just fine.

p.s I ran flutter create. with no luck.

The IDE log

No application found for TargetPlatform.android_x86.
Is your project missing an android/app/src/main/AndroidManifest.xml?

Consider running "flutter create ." to create one.
like image 964
Milad Alakaire Avatar asked Feb 11 '19 18:02

Milad Alakaire


3 Answers

I solved this by flutter clean.

like image 101
Gurjap singh Avatar answered Oct 19 '22 00:10

Gurjap singh


If flutter clean doesnt work manually delete build folder in project root directory.

like image 29
Blasanka Avatar answered Oct 18 '22 23:10

Blasanka


Add package back in the manifest file.

Android Studio 'Chipmunk' (2021.2.1) had recommended that I remove package in AndroidManifest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example">

And it added namespace in android/app/build.gradle:

namespace 'com.example'

This didn't immediately break my app, but after cleaning everything, it broke it, and the only fix was to revert, so that the package name remained in the AndroidManifest.xml, as it was before.

The error I was getting was:

package identifier or launch activity not found.
Please check /example/android/app/src/main/AndroidManifest.xml for errors.
No application found for TargetPlatform.android_arm64.
Is your project missing an android/app/src/main/AndroidManifest.xml?
Consider running "flutter create ." to create one.
like image 22
T.Coutlakis Avatar answered Oct 19 '22 00:10

T.Coutlakis