te')); return $arr; } /* 遍历用户所有主题 * @param $uid 用户ID * @param int $page 页数 * @param int $pagesize 每页记录条数 * @param bool $desc 排序方式 TRUE降序 FALSE升序 * @param string $key 返回的数组用那一列的值作为 key * @param array $col 查询哪些列 */ function thread_tid_find_by_uid($uid, $page = 1, $pagesize = 1000, $desc = TRUE, $key = 'tid', $col = array()) { if (empty($uid)) return array(); $orderby = TRUE == $desc ? -1 : 1; $arr = thread_tid__find($cond = array('uid' => $uid), array('tid' => $orderby), $page, $pagesize, $key, $col); return $arr; } // 遍历栏目下tid 支持数组 $fid = array(1,2,3) function thread_tid_find_by_fid($fid, $page = 1, $pagesize = 1000, $desc = TRUE) { if (empty($fid)) return array(); $orderby = TRUE == $desc ? -1 : 1; $arr = thread_tid__find($cond = array('fid' => $fid), array('tid' => $orderby), $page, $pagesize, 'tid', array('tid', 'verify_date')); return $arr; } function thread_tid_delete($tid) { if (empty($tid)) return FALSE; $r = thread_tid__delete(array('tid' => $tid)); return $r; } function thread_tid_count() { $n = thread_tid__count(); return $n; } // 统计用户主题数 大数量下严谨使用非主键统计 function thread_uid_count($uid) { $n = thread_tid__count(array('uid' => $uid)); return $n; } // 统计栏目主题数 大数量下严谨使用非主键统计 function thread_fid_count($fid) { $n = thread_tid__count(array('fid' => $fid)); return $n; } ?>java - Unable to run "flutter run". I'm getting a lot of errors - Stack Overflow
最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

java - Unable to run "flutter run". I'm getting a lot of errors - Stack Overflow

programmeradmin3浏览0评论

When I run flutter run or flutter run --debug, I got these followings errors:


PS C:\Users\useru\Downloads\project\EDITED\flutter_user> flutter run --debug
Launching lib\main.dart on sdk gphone x86 64 in debug mode...
You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: /to/flutter-gradle-plugin-apply

You are applying Flutter's main Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: /to/flutter-gradle-plugin-apply

Warning: Overriding compileSdk version in Flutter plugin: audioplayers_android from 33 to 34 (to work around ).
If there is not a new version of audioplayers_android, consider filing an issue against audioplayers_android to increase their compileSdk to the latest (otherwise try updating to the latest version).
Warning: Overriding compileSdk version in Flutter plugin: contacts_service from 30 to 34 (to work around ).
If there is not a new version of contacts_service, consider filing an issue against contacts_service to increase their compileSdk to the latest (otherwise try updating to the latest version).
Warning: Overriding compileSdk version in Flutter plugin: flutter_callkit_incoming_fix from 31 to 34 (to work around ).
If there is not a new version of flutter_callkit_incoming_fix, consider filing an issue against flutter_callkit_incoming_fix to increase their compileSdk to the latest (otherwise try updating to the latest version).
Warning: Overriding compileSdk version in Flutter plugin: flutter_native_splash from 31 to 34 (to work around ).
If there is not a new version of flutter_native_splash, consider filing an issue against flutter_native_splash to increase their compileSdk to the latest (otherwise try updating to the latest version).
Warning: Overriding compileSdk version in Flutter plugin: fluttertoast from 33 to 34 (to work around ).
If there is not a new version of fluttertoast, consider filing an issue against fluttertoast to increase their compileSdk to the latest (otherwise try updating to the latest version).
Warning: Overriding compileSdk version in Flutter plugin: geocoding_android from 33 to 34 (to work around ).
If there is not a new version of geocoding_android, consider filing an issue against geocoding_android to increase their compileSdk to the latest (otherwise try updating to the latest version).
Warning: Overriding compileSdk version in Flutter plugin: linphone_flutter_plugin from 31 to 34 (to work around ).
If there is not a new version of linphone_flutter_plugin, consider filing an issue against linphone_flutter_plugin to increase their compileSdk to the latest (otherwise try updating to the latest version).
Warning: Overriding compileSdk version in Flutter plugin: otp_autofill from 33 to 34 (to work around ).
If there is not a new version of otp_autofill, consider filing an issue against otp_autofill to increase their compileSdk to the latest (otherwise try updating to the latest version).
Warning: Overriding compileSdk version in Flutter plugin: package_info_plus from 33 to 34 (to work around ).
If there is not a new version of package_info_plus, consider filing an issue against package_info_plus to increase their compileSdk to the latest (otherwise try updating to the latest version).
Warning: Overriding compileSdk version in Flutter plugin: vibration from 33 to 34 (to work around ).
If there is not a new version of vibration, consider filing an issue against vibration to increase their compileSdk to the latest (otherwise try updating to the latest version).

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> com.android.manifmerger.ManifestMerger2$MergeFailureException: Error parsing C:\Users\useru\Downloads\project\EDITED\flutter_user\android\app\src\main\AndroidManifest.xml

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at 

BUILD FAILED in 42s
Running Gradle task 'assembleDebug'...                             43,5s
Error: Gradle task assembleDebug failed with exit code 1

AND HERE IS C:\Users\useru\Downloads\project\EDITED\flutter_user\android\app\src\main\AndroidManifest.xml content:

<manifest xmlns:android="; package="com.user.sfrix">
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.READ_CONTACTS"/>  
    <uses-permission android:name="android.permission.WRITE_CONTACTS"/>
    <uses-permission android:name="android.permission.CAMERA"/> 
    <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" />
    <uses-permission android:name="android.permission.VIBRATE"/>
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    <uses-permission android:name="android.permission.READ_SMS"/>
    <uses-permission android:name="android.permission.RECEIVE_SMS"/>
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.CALL_PHONE" />
    <uses-permission android:name="android.permission.SYSTEM_CAMERA" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_CAMERA" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL" />
    <uses-permission android:name="android.permission.MANAGE_OWN_CALLS" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />
    <application
        tools:replace="android:label"
        android:label="SFRIX User App"
        android:name="${applicationName}"
        android:icon="@mipmap/ic_launcher">
        <activity
             android:name=".MainActivity"
            android:exported="true"
            android:launchMode="singleTask"
            android:theme="@style/Theme.AppCompat"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize"
            android:showWhenLocked="true"
            android:turnScreenOn="true"
            android:usesCleartextTraffic="true">
            <!-- 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"
              />
              <meta-data android:name="com.google.firebase.messaging.default_notification_channel_id" android:value="1" />
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <meta-data android:name="com.google.android.geo.API_KEY"
               android:value="android map key"/>
        <!-- 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" />
        
        <!-- Ajout de l'Icône dans `android/app/src/main/res/mipmap-<density>/ic_launcher.png` Pour le Package `flutter_local_notifications` -->
        <meta-data
            android:name="com.google.firebase.messaging.default_notification_icon"
            android:resource="@mipmap/ic_launcher" />
    </application>
</manifest>

PLEASE, CAN ANYONE HELP ME ??? Thanks in advance.

When I run flutter run or flutter run --debug, I got these followings errors:


PS C:\Users\useru\Downloads\project\EDITED\flutter_user> flutter run --debug
Launching lib\main.dart on sdk gphone x86 64 in debug mode...
You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/to/flutter-gradle-plugin-apply

You are applying Flutter's main Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/to/flutter-gradle-plugin-apply

Warning: Overriding compileSdk version in Flutter plugin: audioplayers_android from 33 to 34 (to work around https://issuetracker.google/issues/199180389).
If there is not a new version of audioplayers_android, consider filing an issue against audioplayers_android to increase their compileSdk to the latest (otherwise try updating to the latest version).
Warning: Overriding compileSdk version in Flutter plugin: contacts_service from 30 to 34 (to work around https://issuetracker.google/issues/199180389).
If there is not a new version of contacts_service, consider filing an issue against contacts_service to increase their compileSdk to the latest (otherwise try updating to the latest version).
Warning: Overriding compileSdk version in Flutter plugin: flutter_callkit_incoming_fix from 31 to 34 (to work around https://issuetracker.google/issues/199180389).
If there is not a new version of flutter_callkit_incoming_fix, consider filing an issue against flutter_callkit_incoming_fix to increase their compileSdk to the latest (otherwise try updating to the latest version).
Warning: Overriding compileSdk version in Flutter plugin: flutter_native_splash from 31 to 34 (to work around https://issuetracker.google/issues/199180389).
If there is not a new version of flutter_native_splash, consider filing an issue against flutter_native_splash to increase their compileSdk to the latest (otherwise try updating to the latest version).
Warning: Overriding compileSdk version in Flutter plugin: fluttertoast from 33 to 34 (to work around https://issuetracker.google/issues/199180389).
If there is not a new version of fluttertoast, consider filing an issue against fluttertoast to increase their compileSdk to the latest (otherwise try updating to the latest version).
Warning: Overriding compileSdk version in Flutter plugin: geocoding_android from 33 to 34 (to work around https://issuetracker.google/issues/199180389).
If there is not a new version of geocoding_android, consider filing an issue against geocoding_android to increase their compileSdk to the latest (otherwise try updating to the latest version).
Warning: Overriding compileSdk version in Flutter plugin: linphone_flutter_plugin from 31 to 34 (to work around https://issuetracker.google/issues/199180389).
If there is not a new version of linphone_flutter_plugin, consider filing an issue against linphone_flutter_plugin to increase their compileSdk to the latest (otherwise try updating to the latest version).
Warning: Overriding compileSdk version in Flutter plugin: otp_autofill from 33 to 34 (to work around https://issuetracker.google/issues/199180389).
If there is not a new version of otp_autofill, consider filing an issue against otp_autofill to increase their compileSdk to the latest (otherwise try updating to the latest version).
Warning: Overriding compileSdk version in Flutter plugin: package_info_plus from 33 to 34 (to work around https://issuetracker.google/issues/199180389).
If there is not a new version of package_info_plus, consider filing an issue against package_info_plus to increase their compileSdk to the latest (otherwise try updating to the latest version).
Warning: Overriding compileSdk version in Flutter plugin: vibration from 33 to 34 (to work around https://issuetracker.google/issues/199180389).
If there is not a new version of vibration, consider filing an issue against vibration to increase their compileSdk to the latest (otherwise try updating to the latest version).

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> com.android.manifmerger.ManifestMerger2$MergeFailureException: Error parsing C:\Users\useru\Downloads\project\EDITED\flutter_user\android\app\src\main\AndroidManifest.xml

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.

BUILD FAILED in 42s
Running Gradle task 'assembleDebug'...                             43,5s
Error: Gradle task assembleDebug failed with exit code 1

AND HERE IS C:\Users\useru\Downloads\project\EDITED\flutter_user\android\app\src\main\AndroidManifest.xml content:

<manifest xmlns:android="http://schemas.android/apk/res/android" package="com.user.sfrix">
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.READ_CONTACTS"/>  
    <uses-permission android:name="android.permission.WRITE_CONTACTS"/>
    <uses-permission android:name="android.permission.CAMERA"/> 
    <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" />
    <uses-permission android:name="android.permission.VIBRATE"/>
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    <uses-permission android:name="android.permission.READ_SMS"/>
    <uses-permission android:name="android.permission.RECEIVE_SMS"/>
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.CALL_PHONE" />
    <uses-permission android:name="android.permission.SYSTEM_CAMERA" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_CAMERA" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL" />
    <uses-permission android:name="android.permission.MANAGE_OWN_CALLS" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />
    <application
        tools:replace="android:label"
        android:label="SFRIX User App"
        android:name="${applicationName}"
        android:icon="@mipmap/ic_launcher">
        <activity
             android:name=".MainActivity"
            android:exported="true"
            android:launchMode="singleTask"
            android:theme="@style/Theme.AppCompat"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize"
            android:showWhenLocked="true"
            android:turnScreenOn="true"
            android:usesCleartextTraffic="true">
            <!-- 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"
              />
              <meta-data android:name="com.google.firebase.messaging.default_notification_channel_id" android:value="1" />
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <meta-data android:name="com.google.android.geo.API_KEY"
               android:value="android map key"/>
        <!-- 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" />
        
        <!-- Ajout de l'Icône dans `android/app/src/main/res/mipmap-<density>/ic_launcher.png` Pour le Package `flutter_local_notifications` -->
        <meta-data
            android:name="com.google.firebase.messaging.default_notification_icon"
            android:resource="@mipmap/ic_launcher" />
    </application>
</manifest>

PLEASE, CAN ANYONE HELP ME ??? Thanks in advance.

Share Improve this question edited 2 days ago Marc-aurèle Chégnimonhan asked 2 days ago Marc-aurèle ChégnimonhanMarc-aurèle Chégnimonhan 112 bronze badges 1
  • I just posted AndroidManifest.xml content in the original post above. Read it back please – Marc-aurèle Chégnimonhan Commented 2 days ago
Add a comment  | 

1 Answer 1

Reset to default 0

You are using tools:replace in <activity>, so an attribute from the tools XML namespace, but you did not define this namespace in the <manifest>. Change the first line to the one below. Line breaks are for legibility.

<manifest
    xmlns:android="http://schemas.android/apk/res/android" 
    xmlns:tools="http://schemas.android/tools" 
    package="com.user.sfrix">
发布评论

评论列表(0)

  1. 暂无评论