0

构建错误出现在弹出窗口中。

Gradle Error: MinSDK in Manifest

The minSdk version can not be specified in the AndroidManifest.xml file. You have to remove it.
(See the Console for details)

构建错误出现在控制台中

> Configure project :launcher
WARNING: The option 'android.enableR8' is deprecated and should not be used anymore.
It will be removed in a future version of the Android Gradle plugin, and will no longer allow you to disable R8.



Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':launcher:lintVitalRelease'.



UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors
  at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002be] in /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:190 
  at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:95 
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)

我无法复制的一些错误的图片。 控制台错误,点击查看

本质上: 我尝试过重新安装/更新 JAVA。我已经尝试从 我尝试过互联网上所有可能的解决方案中删除minsdk线路,但仍然出现相同的错误。AndroidManifext.xml请帮助解决这个问题我想要构建。

AndroidManifest.xml 文件

<?xml version="1.0" encoding="utf-8"?>

<!--
   WARNING: Do NOT modify! Generated file.
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="__AndroidManifest_Package__"
    android:versionCode="__AndroidManifest_VersionCode__"
    android:versionName="__AndroidManifest_VersionName__">
    
    <uses-sdk 
   
        android:targetSdkVersion="__AndroidManifest_TargetSdkVersion__"/>

</manifest>

4

1 回答 1

0

我看不到您的问题,但这是适用于我的清单文件。你可以试试这个。请务必在第 4 行设置您的包名称。

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
      xmlns:tools="http://schemas.android.com/tools" 
      package="com.test.test" 
      android:theme="@android:style/Theme.NoTitleBar" 
android:versionCode="1" android:versionName="1.0">
<supports-screens 
android:smallScreens="true" 
android:normalScreens="true" 
android:largeScreens="true" 
android:xlargeScreens="true" 
android:anyDensity="true" />
<application android:icon="@drawable/app_icon" 
           android:label="@string/app_name" 
           android:debuggable="true" 
           android:usesCleartextTraffic="true" 
           android:theme="@style/UnityThemeSelector">
  <activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="@string/app_name">
  <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
  </intent-filter>   
  <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
  <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
</activity>
</application>
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="21" />
</manifest>
于 2021-09-18T08:53:17.183 回答