如何修復錯誤:“vs代碼上的資源mipmap/ic_啟動器(又名com.example.MyAppName:mipmap/ic_launcher)而不是found."”

我需要一些幫助來解決我的聊天應用程序面臨的問題。一切都很順利,但我把這個項目擱置了months.And當我再次開始工作時,我不得不升級所有的包和flutter本身,以便它能工作。但我不知道為什么會發生這種錯誤,這里是完整的錯誤:

任務':app:processDebugResources'.執行失敗>執行com.android.build.gradle.internal.tasks.Workers$ActionFacadeAndroid資源鏈接失敗D:\MyAppName2.0\myappname\build\app\intermediates\packaged_manifests\debug\AndroidManifest.xml:19:AAPT:錯誤:資源mipmap/ic_launcher(又名com.example.MyAppName:mipmap/ic_launcher)未找到。

我沒有試圖改變圖標的任何名稱或其他任何東西,所以如果有人能幫助我,那將是非常棒的。這是我的pubspec.yaml文件和AndroidManifest.xml:

   name: MyAppName
    description: A new Flutter project.

    environment:
      sdk: ">=2.12.0 <3.0.0"

    dependencies:
      flutter:
       sdk: flutter
  
    cupertino_icons: ^1.0.4
    flutter_svg: ^1.0.3
    emoji_picker: ^0.1.0
    shared_preferences: ^0.5.4+1
    camera: ^0.9.4+10
    path_provider: ^2.0.2
    path: 
    video_player: ^2.1.6
    socket_io_client: ^1.0.1


    dev_dependencies:
      flutter_test:
        sdk: flutter



    uses-material-design: true

  
    fonts:
     - family: OpenSans
      fonts:
        - asset: fonts/OpenSans-Bold.ttf
        - asset: fonts/OpenSans-Regular.ttf
        - asset: fonts/OpenSans-Italic.ttf
          style: italic

以及AndroidManifest.xml:

    <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.MyAppName"
    android:versionCode="1"
    android:versionName="1.0.0" >

    <uses-sdk
        android:minSdkVersion="21"
        android:targetSdkVersion="31" />
    <!--
         Flutter needs it to communicate with the running application
         to allow setting breakpoints, to provide hot reload, etc.
    -->
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <application
        android:appComponentFactory="androidx.core.app.CoreComponentFactory"
        android:debuggable="true"
        android:icon="@mipmap/ic_launcher"
        android:label="MyAppName"
        android:usesCleartextTraffic="true" >
        <activity
            android:name="com.example.MyAppName.MainActivity"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            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" />
            <!--
                 Displays an Android View that continues showing the launch screen
                 Drawable until Flutter paints its first frame, then this splash
                 screen fades out. A splash screen is useful to avoid any visual
                 gap between the end of Android's launch screen and the painting of
                 Flutter's first frame.
            -->
            <meta-data
                android:name="io.flutter.embedding.android.SplashScreenDrawable"
                android:resource="@drawable/launch_background" />

            <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" />

        <uses-library
            android:name="androidx.window.extensions"
            android:required="false" />
        <uses-library
            android:name="androidx.window.sidecar"
            android:required="false" />
    </application>

</manifest>

如果您需要查看其他文件,這絕對沒有問題!謝謝

? 最佳回答:

這是因為flutter發生了變化。簡單的方法是創建一個同名的新項目,然后將舊文件(庫、資產或其他)復制到剛剛創建的項目中

主站蜘蛛池模板: 国产日韩视频一区| 日本一区二区三区不卡在线视频| 人妻少妇精品视频一区二区三区| 91麻豆精品国产自产在线观看一区| 在线视频一区二区三区四区| 日韩最新视频一区二区三| 久久精品无码一区二区三区免费 | 国产福利一区二区三区| 福利一区福利二区| 日韩精品无码视频一区二区蜜桃| 国产一区二区视频在线播放| 国内精品无码一区二区三区| 国产自产对白一区| 中文字幕在线观看一区二区三区| 国产成人一区二区三区在线观看| 国产福利酱国产一区二区 | 国产日韩AV免费无码一区二区| 久久精品无码一区二区WWW| 好爽毛片一区二区三区四 | 中文字幕一区在线| 国产成人精品a视频一区| 亚洲综合一区二区精品导航| 日韩免费无码视频一区二区三区| 亚洲日本一区二区三区在线| 成人在线观看一区| 日韩人妻一区二区三区蜜桃视频| 精品无码中出一区二区| 无码视频免费一区二三区| 亚洲啪啪综合AV一区| 精品日产一区二区三区手机| 国产一区二区三区在线观看免费| 伊人激情AV一区二区三区| 无码一区二区三区| 精品欧洲AV无码一区二区男男 | 无码av免费一区二区三区试看| 精品亚洲AV无码一区二区三区 | 大伊香蕉精品一区视频在线| 无码一区二区三区爆白浆| 亚洲第一区精品观看| 婷婷亚洲综合一区二区| 日本韩国一区二区三区|