flutter app doesn't work without give any error

120 Views Asked by At

I have a flutter app that was running before I started adding "image_cropper" after I added it the app still works but then I have to edit on "AndroidManifest 'I edited it ,after that the app not works any more I reinstated "AndroidManifest" as it is and the app still doesn't work. Note : *I try to run it on android device I think it will work if I run it on chrome * what should I do? My Manifest :

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
    <application
        android:label="football_scheduler"
        android:name="${applicationName}"
        android:usesCleartextTraffic="true"
        android:icon="@mipmap/ic_launcher">
        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize">
            <!-- Specifies an Android theme to apply to this Activity as soon as
                 the Android process has started. This theme is visible to the user
                 while the Flutter UI initializes. After that, this theme continues
                 to determine the Window background behind the Flutter UI. -->
            <meta-data
              android:name="io.flutter.embedding.android.NormalTheme"
              android:resource="@style/NormalTheme"
              />
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <!-- Don't delete the meta-data below.
             This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
        <meta-data
            android:name="flutterEmbedding"
            android:value="2" />
    </application>
</manifest>

What I tried return "AndroidManifest" as it is.

1

There are 1 best solutions below

0
Hisham shattnawi On

I solved the problem by adding these commands to the terminal one by one

flutter clean

flutter build

flutter pub get