如果您已经将编译版本设置为31,则需要添加
代码语言:javascript复制android:exported="true"敬你的活动、服务和接受者。见这里。
在你的情况下
代码语言:javascript复制 android:minSdkVersion="21" android:targetSdkVersion="31" /> android:name="android.permission.FLASHLIGHT" /> android:name="android.permission.INTERNET" /> android:name="android.permission.CAMERA" /> android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> android:label="D MyApp" android:icon="@ref/0x7f07015e" android:name="crc646948444ac10504e5.MainApplication" android:debuggable="true" android:allowBackup="true" android:largeHeap="true" android:extractNativeLibs="true"> android:name="com.google.android.gms.vision.DEPENDENCIES" android:value="barcode" /> android:theme="@ref/0x7f0d0001" android:label="MyApp" android:icon="@ref/0x7f07015e" android:name="crc646948444ac10504e5.MainActivity" android:screenOrientation="1" android:configChanges="0x680" android:exported="true"/> android:theme="@ref/0x7f0d0000" android:name="crc646948444ac10504e5.SplashActivity" android:exported="true" android:screenOrientation="1" android:noHistory="true"> android:name="android.intent.action.MAIN" /> android:name="android.intent.category.LAUNCHER" /> android:label="Web Authenticator" android:name="crc641e66d166111bdf3e.FormAuthenticatorActivity" android:exported="true"/> android:label="Web Authenticator" android:name="crc641e66d166111bdf3e.WebAuthenticatorActivity" android:exported="true"/> android:label="Web Authenticator Native Browser" android:name="crc641e66d166111bdf3e.WebAuthenticatorNativeBrowserActivity" android:launchMode="1" android:exported="true"/> android:name="com.microsoft.windowsazure.mobileservices.authentication.RedirectUrlActivity" android:exported="true"/> android:name="crc64a98abb514ffad9f1.KeepAliveService" android:exported="true"/> android:label="Essentials Connectivity Broadcast Receiver" android:name="crc64a0e0a82d0db9a07d.ConnectivityBroadcastReceiver" android:enabled="true" android:exported="false" /> android:name="crc643f46942d9dd1fff9.PowerSaveModeBroadcastReceiver" android:enabled="true" android:exported="false" /> android:name="mono.android.MultiDexLoader" android:exported="false" android:authorities="com.app.myapp.mono.android.MultiDexLoader.__mono_init__" android:initOrder="1999999999" /> android:name="mono.MonoRuntimeProvider" android:exported="false" android:authorities="com.app.myapp.mono.MonoRuntimeProvider.__mono_init__" android:initOrder="1999999998" /> android:theme="@ref/0x01030010" android:name="com.google.android.gms.common.api.GoogleApiActivity" android:exported="false" /> android:name="com.google.android.gms.version" android:value="@ref/0x7f090008" /> android:name="android.permission.ACCESS_NETWORK_STATE" />请小心什么真正需要出口或不出口,并相应地改变。 也可能是因为App在Android11中需要一个强制的应用程序签名者,请参阅这里,这里,以防万一,下面是代码片段 从Android11开始,就必须使用APK签名器(如果您使用API 30),因为它将设置一些额外的方案"APK签名方案v2现在需要“。App现在(自2020年12月17日起)在内部使用APK签名器,而不是以前使用的JAR签名器来签署Android应用程序。作为在应用程序中心启用APK签名器功能的一部分,安卓签名任务V3已经实现,对新签名任务的要求是更改密钥存储库文件的保存方式--将密钥存储库文件存储在AzDO安全文件中(Android签名、构建和发布任务-- Azure管道- Microsoft Docs)。警告任何在2020年12月17日之前上传了密钥存储库文件的构建配置仍然使用APK签名方案v2签名方法(jarsigner)。要使用APK签名方案v3签名流程,用户只需重新上传密钥存储库文件并保存分支配置即可。