FLUTTER ERROR :Error: ADB exited with exit code 1
FLUTTER ERROR :Error: ADB exited with exit code 1
我在 运行 我的 flutter app.The 应用程序在 chrome 上启动时收到此错误,但不会在模拟器或真实移动设备上启动
Error: ADB exited with exit code 1
Performing Streamed Install
adb: failed to install
C:\Users\HP\Desktop\OWASLO\care_giver_app\build\app\outputs\flutter-apk\app.apk:
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during
installPackageLI: /data/app/vmdl1352177004.tmp/base.apk (at Binary XML file line #53):
com.owaslo.sukithasagayo.caregiver.MainActivity: Targeting S+ (version 31 and above)
requires that an explicit value for android:exported be defined when intent filters
are present]
Error launching application on Pixel 6.
下面是我的 AndroidManifest file.Ive 在 gradle 文件中启用了 multidex。
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.owaslo.sukithasagayo.caregiver">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:label="Sukitha Sagayo Member"
android:icon="@mipmap/launcher_icon">
<provider
android:name="vn.hunghd.flutterdownloader.DownloadedFileProvider"
android:authorities="${applicationId}.flutter_downloader.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"/>
</provider>
<activity
android:name=".MainActivity"
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">
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<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>
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
下面 link 包含我的 gradle 文件
gradle file
请帮忙!!!
从 android 12
开始将此 属性 添加到 <activity>
需要为 activity 编写此内容并且您的设备有 android api 级别 31
即 android - 12
android:exported="true"
我在 运行 我的 flutter app.The 应用程序在 chrome 上启动时收到此错误,但不会在模拟器或真实移动设备上启动
Error: ADB exited with exit code 1
Performing Streamed Install
adb: failed to install
C:\Users\HP\Desktop\OWASLO\care_giver_app\build\app\outputs\flutter-apk\app.apk:
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during
installPackageLI: /data/app/vmdl1352177004.tmp/base.apk (at Binary XML file line #53):
com.owaslo.sukithasagayo.caregiver.MainActivity: Targeting S+ (version 31 and above)
requires that an explicit value for android:exported be defined when intent filters
are present]
Error launching application on Pixel 6.
下面是我的 AndroidManifest file.Ive 在 gradle 文件中启用了 multidex。
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.owaslo.sukithasagayo.caregiver">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:label="Sukitha Sagayo Member"
android:icon="@mipmap/launcher_icon">
<provider
android:name="vn.hunghd.flutterdownloader.DownloadedFileProvider"
android:authorities="${applicationId}.flutter_downloader.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"/>
</provider>
<activity
android:name=".MainActivity"
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">
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<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>
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
下面 link 包含我的 gradle 文件 gradle file
请帮忙!!!
从 android 12
开始将此 属性 添加到 <activity>
需要为 activity 编写此内容并且您的设备有 android api 级别 31
即 android - 12
android:exported="true"