嗨,有人能帮我吗?我只是按照这里的说明:开发者。Androidcom/about/versions/12/behavior-changes-12#导出
但我仍然得到同样的错误“你上传了一个APK或Android应用程序包,它有一个活动,活动别名,服务或广播接收器与意图过滤器,但没有'Android:导出'属性集。此文件不能安装在Android 12或更高版本。见:developer.android.com/about/versions/12/behavior-changes-12#exported”
将文件上载到google play Consoure应用程序包发布时
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.HatidRider.app"
xmlns:tools="http://schemas.android.com/tools">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https" />
</intent>
<intent>
<action android:name="android.intent.action.DIAL" />
<data android:scheme="tel" />
</intent>
<intent>
<action android:name="android.intent.action.SEND" />
<data android:mimeType="*/*" />
</intent>
</queries>
<application
android:name=".App"
tools:replace="android:label"
android:label="Hatid-PH Delivery"
android:requestLegacyExternalStorage="true"
android:usesCleartextTraffic="true"
android:icon="@mipmap/ic_launcher">
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyCaCSJ0BZItSyXqBv8vpD1N4WBffJeKhLQ"/>
<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">
<!-- 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>
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<service
android:name="com.HatidRider.app.BackgroundService"
android:enabled="true"
android:exported="true" />
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.HatidRider.app"
xmlns:tools="http://schemas.android.com/tools">
<!-- io.flutter.app.FlutterApplication is an
android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate
method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https" />
</intent>
<intent>
<action android:name="android.intent.action.DIAL" />
<data android:scheme="tel" />
</intent>
<intent>
<action android:name="android.intent.action.SEND" />
<data android:mimeType="*/*" />
</intent>
</queries>
<application
android:name=".App"
tools:replace="android:label"
android:label="Hatid-PH Delivery"
android:requestLegacyExternalStorage="true"
android:usesCleartextTraffic="true"
android:icon="@mipmap/ic_launcher">
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyCaCSJ0BZItSyXqBv8vpD1N4WBffJeKhLQ"/>
<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"
/>
<!-- 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>
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<service
android:name="com.HatidRider.app.BackgroundService"
android:enabled="true"
android:exported="true" />
<meta-data
android:name="flutterEmbedding"
android:value="2" />
检查如果它现在工作,我有显式设置android:导出=真
作为你有启动器
和在其他地方
问题:您上传了一个APK或Android应用程序捆绑包,该捆绑包具有活动、活动别名、服务或带有意图过滤器的广播接收器,但没有“Android:导出”属性集。此文件不能安装在Android 12或更高版本。请参阅:developer.android.com/about/versions/12/behavior-changes-12#exported我的Androidanifest.xml文件
我在将应用程序包上载到play console时遇到问题,您上载了一个APK或Android应用程序包,该应用程序包具有活动、活动别名、服务或广播接收器(带有意图过滤器),但没有“Android:exported”属性集。无法在Android 12或更高版本上安装此文件。但我的清单文件包含该属性。 舱单文件:- 错误:-在此处输入图像描述
我有两个单独的应用程序。 第一个发送两种不同的广播。 第二个等待来自App#1的这个广播,并使用广播来决定发起什么活动。 但是,如果App#2中没有定义默认活动,它将无法运行并抛出: 运行应用程序时出错:找不到默认活动 但是,如果我确实在清单文件中定义了一个,那么这就违背了广播的目的。 正如@lemi Miles所建议的,我们只需在启动选项上转到App>Edit Configurations>并选
我目前正在使用SharedReferences跟踪通过AlarmManager启动的BroadcastReceiver中要执行工作的项列表。除了一个特定的场景外,一切都很好。当我触发一个新项目来执行工作时,让它完成工作,然后删除该项目(全部通过SharedReferences编辑),它在应用程序运行时工作得很好。当列表中没有任何内容,我打开任务管理器并终止应用程序时,该项突然出现在Broadcas
每当它收到消息时,它都会在后台运行,即使应用程序没有运行,它也应该从后台启动活动
问题内容: 我的主要活动是启动服务(位置服务),我希望该服务在每次找到新位置时广播新位置。 多亏了日志,我知道该服务正在运行,并且每隔几秒钟便有新的位置,但我从未得到广播。 MainActivity.java CMBroadcastReceiver.java LocationService.java AndroidManifest.xml 我在日志中看到“已发送广播”,但从未收到“已接收广播” 任