skip to Main Content

My flutter project won’t run anymore. This project used to run just fine. I don’t know what has changed. This is a learning project so I took a couple of days off and now when I execute "flutter run -v" this is what I get:

PS C:clientminer> flutter run -v
[  +12 ms] executing: [C:srcflutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +236 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +4 ms] f468f3366c26a5092eb964a230ce7892fda8f2f8
[   +1 ms] executing: [C:srcflutter/] git tag --points-at f468f3366c26a5092eb964a230ce7892fda8f2f8
[ +306 ms] Exit code 0 from: git tag --points-at f468f3366c26a5092eb964a230ce7892fda8f2f8
[   +1 ms] 3.10.6
[   +5 ms] executing: [C:srcflutter/] git rev-parse --abbrev-ref HEAD
[ +215 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[   +1 ms] stable
[ +158 ms] executing: [C:srcflutter/] git rev-parse --abbrev-ref --symbolic @{upstream}
[ +218 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{upstream}
[   +1 ms] origin/stable
[   +1 ms] executing: [C:srcflutter/] git ls-remote --get-url origin
[ +231 ms] Exit code 0 from: git ls-remote --get-url origin
[   +1 ms] https://github.com/flutter/flutter.git
[ +375 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[   +2 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[  +12 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[   +2 ms] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +226 ms] executing: C:UsersOwnerAppDataLocalAndroidsdkplatform-toolsadb.exe devices -l
[ +206 ms] List of devices attached
                    emulator-5554          device product:sdk_gphone64_x86_64 model:sdk_gphone64_x86_64 device:emu64xa transport_id:1   
[  +16 ms] C:UsersOwnerAppDataLocalAndroidsdkplatform-toolsadb.exe -s emulator-5554 shell getprop
[ +217 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[   +2 ms] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[  +18 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[   +2 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +419 ms] Skipping pub get: version match.
[  +93 ms] Found plugin flutter_plugin_android_lifecycle at
C:UsersOwnerAppDataLocalPubCachehostedpub.devflutter_plugin_android_lifecycle-2.0.16
[  +28 ms] Found plugin google_maps_flutter at C:UsersOwnerAppDataLocalPubCachehostedpub.devgoogle_maps_flutter-2.5.0
[   +7 ms] Found plugin google_maps_flutter_android at
C:UsersOwnerAppDataLocalPubCachehostedpub.devgoogle_maps_flutter_android-2.5.1
[   +7 ms] Found plugin google_maps_flutter_ios at C:UsersOwnerAppDataLocalPubCachehostedpub.devgoogle_maps_flutter_ios-2.3.1 
[  +14 ms] Found plugin google_maps_flutter_web at
C:UsersOwnerAppDataLocalPubCachehostedpub.devgoogle_maps_flutter_web-0.5.4+1
[  +48 ms] Found plugin path_provider at C:UsersOwnerAppDataLocalPubCachehostedpub.devpath_provider-2.1.0
[   +9 ms] Found plugin path_provider_android at C:UsersOwnerAppDataLocalPubCachehostedpub.devpath_provider_android-2.1.0
[   +6 ms] Found plugin path_provider_foundation at
C:UsersOwnerAppDataLocalPubCachehostedpub.devpath_provider_foundation-2.3.0
[  +10 ms] Found plugin path_provider_linux at C:UsersOwnerAppDataLocalPubCachehostedpub.devpath_provider_linux-2.2.0
[  +16 ms] Found plugin path_provider_windows at C:UsersOwnerAppDataLocalPubCachehostedpub.devpath_provider_windows-2.2.0
[ +192 ms] Found plugin flutter_plugin_android_lifecycle at
C:UsersOwnerAppDataLocalPubCachehostedpub.devflutter_plugin_android_lifecycle-2.0.16
[  +11 ms] Found plugin google_maps_flutter at C:UsersOwnerAppDataLocalPubCachehostedpub.devgoogle_maps_flutter-2.5.0
[   +7 ms] Found plugin google_maps_flutter_android at
C:UsersOwnerAppDataLocalPubCachehostedpub.devgoogle_maps_flutter_android-2.5.1
[   +8 ms] Found plugin google_maps_flutter_ios at C:UsersOwnerAppDataLocalPubCachehostedpub.devgoogle_maps_flutter_ios-2.3.1
[   +9 ms] Found plugin google_maps_flutter_web at
C:UsersOwnerAppDataLocalPubCachehostedpub.devgoogle_maps_flutter_web-0.5.4+1
[  +30 ms] Found plugin path_provider at C:UsersOwnerAppDataLocalPubCachehostedpub.devpath_provider-2.1.0
[   +6 ms] Found plugin path_provider_android at C:UsersOwnerAppDataLocalPubCachehostedpub.devpath_provider_android-2.1.0
[   +5 ms] Found plugin path_provider_foundation at
C:UsersOwnerAppDataLocalPubCachehostedpub.devpath_provider_foundation-2.3.0
[   +8 ms] Found plugin path_provider_linux at C:UsersOwnerAppDataLocalPubCachehostedpub.devpath_provider_linux-2.2.0
[   +7 ms] Found plugin path_provider_windows at C:UsersOwnerAppDataLocalPubCachehostedpub.devpath_provider_windows-2.2.0     
[ +119 ms] Found plugin flutter_plugin_android_lifecycle at
C:UsersOwnerAppDataLocalPubCachehostedpub.devflutter_plugin_android_lifecycle-2.0.16
[  +13 ms] Found plugin google_maps_flutter at C:UsersOwnerAppDataLocalPubCachehostedpub.devgoogle_maps_flutter-2.5.0
[   +4 ms] Found plugin google_maps_flutter_android at
C:UsersOwnerAppDataLocalPubCachehostedpub.devgoogle_maps_flutter_android-2.5.1
[   +5 ms] Found plugin google_maps_flutter_ios at C:UsersOwnerAppDataLocalPubCachehostedpub.devgoogle_maps_flutter_ios-2.3.1 
[   +9 ms] Found plugin google_maps_flutter_web at
C:UsersOwnerAppDataLocalPubCachehostedpub.devgoogle_maps_flutter_web-0.5.4+1
[  +24 ms] Found plugin path_provider at C:UsersOwnerAppDataLocalPubCachehostedpub.devpath_provider-2.1.0
[   +4 ms] Found plugin path_provider_android at C:UsersOwnerAppDataLocalPubCachehostedpub.devpath_provider_android-2.1.0
[   +4 ms] Found plugin path_provider_foundation at
C:UsersOwnerAppDataLocalPubCachehostedpub.devpath_provider_foundation-2.3.0
[   +6 ms] Found plugin path_provider_linux at C:UsersOwnerAppDataLocalPubCachehostedpub.devpath_provider_linux-2.2.0
[   +6 ms] Found plugin path_provider_windows at C:UsersOwnerAppDataLocalPubCachehostedpub.devpath_provider_windows-2.2.0
[  +71 ms] Generating C:clientminerandroidappsrcmainjavaioflutterpluginsGeneratedPluginRegistrant.java
[ +236 ms] ro.hardware = ranchu
[  +29 ms] Using hardware rendering with device sdk gphone64 x86 64. If you notice graphics artifacts, consider enabling software
rendering with
           "--enable-software-rendering".
[  +82 ms] Initializing file store
[  +32 ms] Skipping target: gen_localizations
[  +19 ms] gen_dart_plugin_registrant: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents:
C:clientminer.dart_toolpackage_config_subset,C:clientminer.dart_toolflutter_builddart_plugin_registrant.dart}
[  +44 ms] Found plugin flutter_plugin_android_lifecycle at
C:UsersOwnerAppDataLocalPubCachehostedpub.devflutter_plugin_android_lifecycle-2.0.16
[   +8 ms] Found plugin google_maps_flutter at C:UsersOwnerAppDataLocalPubCachehostedpub.devgoogle_maps_flutter-2.5.0
[   +4 ms] Found plugin google_maps_flutter_android at
C:UsersOwnerAppDataLocalPubCachehostedpub.devgoogle_maps_flutter_android-2.5.1
[   +3 ms] Found plugin google_maps_flutter_ios at C:UsersOwnerAppDataLocalPubCachehostedpub.devgoogle_maps_flutter_ios-2.3.1
[   +5 ms] Found plugin google_maps_flutter_web at
C:UsersOwnerAppDataLocalPubCachehostedpub.devgoogle_maps_flutter_web-0.5.4+1
[  +24 ms] Found plugin path_provider at C:UsersOwnerAppDataLocalPubCachehostedpub.devpath_provider-2.1.0
[   +4 ms] Found plugin path_provider_android at C:UsersOwnerAppDataLocalPubCachehostedpub.devpath_provider_android-2.1.0
[   +3 ms] Found plugin path_provider_foundation at
C:UsersOwnerAppDataLocalPubCachehostedpub.devpath_provider_foundation-2.3.0
[   +6 ms] Found plugin path_provider_linux at C:UsersOwnerAppDataLocalPubCachehostedpub.devpath_provider_linux-2.2.0
[   +6 ms] Found plugin path_provider_windows at C:UsersOwnerAppDataLocalPubCachehostedpub.devpath_provider_windows-2.2.0
[  +70 ms] gen_dart_plugin_registrant: Complete
[  +13 ms] Skipping target: _composite
[   +4 ms] complete
[  +20 ms] Launching libmain.dart on sdk gphone64 x86 64 in debug mode...
[  +17 ms] C:srcflutterbincachedart-sdkbindart.exe --disable-dart-dev
C:srcflutterbincachedart-sdkbinsnapshotsfrontend_server.dart.snapshot --sdk-root
C:srcflutterbincacheartifactsenginecommonflutter_patched_sdk/ --incremental --target=flutter --experimental-emit-debug-metadata 
-DFLUTTER_WEB_AUTO_DETECT=true
-DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/cdbeda788a293fa29665dc3fa3d6e63bd221cb0d/ --output-dill
C:UsersOwnerAppDataLocalTempflutter_tools.1457db73flutter_tool.4bb21dc1app.dill --packages
C:clientminer.dart_toolpackage_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation  
--filesystem-scheme org-dartlang-root --initialize-from-dill buildade00fc64fa695e0daed02c1105f6d67.cache.dill.track.dill --source      
file:///C:/clientminer/.dart_tool/flutter_build/dart_plugin_registrant.dart --source package:flutter/src/dart_plugin_registrant.dart    
-Dflutter.dart_plugin_registrant=file:///C:/clientminer/.dart_tool/flutter_build/dart_plugin_registrant.dart --verbosity=error
--enable-experiment=alternative-invalidation-strategy
[  +45 ms] package identifier or launch activity not found.
[   +8 ms] Please check C:clientminerandroidappsrcmainAndroidManifest.xml for errors.
[  +13 ms] No application found for TargetPlatform.android_x64.
           Is your project missing an androidappsrcmainAndroidManifest.xml?
           Consider running "flutter create ." to create one.
[  +61 ms] <- compile package:for_testing/main.dart
[+29782 ms] "flutter run" took 32,555ms.
[   +8 ms] 
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
           #1      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:757:9)
           <asynchronous suspension>
           #2      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1336:27)
           <asynchronous suspension>
           #3      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #4      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
           <asynchronous suspension>
           #5      FlutterCommandRunner.runCommand.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command_runner.dart:296:9)
           <asynchronous suspension>
           #6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #7      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:244:5)
           <asynchronous suspension>
           #8      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:91:9)
           <asynchronous suspension>
           #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #10     main (package:flutter_tools/executable.dart:91:3)
           <asynchronous suspension>


[ +114 ms] ensureAnalyticsSent: 91ms
[   +1 ms] Running 1 shutdown hook
[  +13 ms] Shutdown hooks complete
[   +1 ms] exiting with code 1

I think I am missing the "package" attribute in the <manifest line but I don’t know what I need to put there. This is my AndroidManifest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS\_NETWORK\_STATE" />

   <application
        android:label="clientminer"
        android:name="${applicationName}"
        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>

It seems to be complaining about the AndroidManifest.xml file but I don’t know much about it. I tried running the command "flutter create" to recreate the manifest file but I am not sure which parameter to run to get the command to work.

Can you please help me get this running again?

2

Answers


  1. Chosen as BEST ANSWER

    I figured it out. I needed to run "flutter create ." I had not realized the . was part of the command.


  2. How to add package name to AndroidManifest.xml? Go to android/app/build.gradle and copy the applicationId. Now paste it manifest tag with a new attribute package.

    Ex: package="com.example.application_id".

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search