简体   繁体   English

GooglePlayGamesManifest.plugin 缺少 AndroidManifest.xml 文件。 [统一]

[英]GooglePlayGamesManifest.plugin is missing AndroidManifest.xml file. [Unity]

I am trying to implement leaderboards into my game, but when building for Android I get this error:我正在尝试在我的游戏中实现排行榜,但是在为 Android 构建时出现此错误:

Project 'E:\Unity\Project\Cave Boat\Temp\StagingArea\android-libraries\GooglePlayGamesManifest.plugin' is missing AndroidManifest.xml file.
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

The plugin I use is CloudOnce.我使用的插件是 CloudOnce。 There are no errors on runtime, only when building.运行时没有错误,只有在构建时。

That error is one of 3, here are the other two;该错误是 3 个之一,这是另外两个;

2: 2:

    UnityException: Adding Android library projects failed!
UnityEditor.Android.AndroidLibraries.AddLibraryProject (System.String projectPropertiesPath) (at <5f8140421e7d41ada100b629c3033aa7>:0)
UnityEditor.Android.AndroidLibraries.FindAndAddLibraryProjects (System.String searchPattern) (at <5f8140421e7d41ada100b629c3033aa7>:0)
UnityEditor.Android.PostProcessor.Tasks.AddAndroidLibraries.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <5f8140421e7d41ada100b629c3033aa7>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <5f8140421e7d41ada100b629c3033aa7>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <5f8140421e7d41ada100b629c3033aa7>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <5f8140421e7d41ada100b629c3033aa7>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <3b1af5075b0340cfb428dfcef292b2ea>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

3: 3:

Build completed with a result of 'Failed'
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

I just run into this issue and I solved it in the following steps:我刚刚遇到了这个问题,并通过以下步骤解决了它:

Note: I am using the CloudOnce package.注意:我使用的是 CloudOnce 包。

  1. Make sure you installed CloudOnce package correctly确保您正确安装了CloudOnce
  2. In Unity > Window > CloudOnce > EditorUnity > Window > CloudOnce > Editor
  3. Make sure you have the google play id added and click set up确保您添加了 google play id 并单击设置
  4. Save
  5. It will generate a AndroidManifest.xml file:它将生成一个AndroidManifest.xml文件:

Just had the exact same issue (and found your post).刚刚遇到了完全相同的问题(并找到了您的帖子)。 After some research, I've found the following answers: https://answers.unity.com/questions/1745738/android-sdk-not-found-or-invalid-in-unity.html and https://answers.unity.com/questions/1684441/android-sdk-not-found-error-in-unity-201930f1.html经过一番研究,我找到了以下答案: https: //answers.unity.com/questions/1745738/android-sdk-not-found-or-invalid-in-unity.htmlhttps://answers。 unity.com/questions/1684441/android-sdk-not-found-error-in-unity-201930f1.html

Please follow the instructions:请按照说明操作:

  1. Download Android Studio (with SDK Manager) https://developer.android.com/studio下载 Android Studio(带 SDK 管理器) https://developer.android.com/studio
  2. Run SDK manager运行 SDK 管理器
  3. Download SDK to specific folder将 SDK 下载到特定文件夹
  4. Uncheck "Android SDK Tools installed with Unity" in external tools dialog box and specify (in external tools dialog box) the specific folder where SDK is installed在外部工具对话框中取消选中“使用 Unity 安装的 Android SDK 工具”并指定(在外部工具对话框中)安装 SDK 的特定文件夹
  5. In CloudOnce settings: "Run Setup" and Save configuration在 CloudOnce 设置中:“运行设置”并保存配置
  6. Ensure your Target SDK is installed ( https://forum.unity.com/threads/still-target-android-sdk-of-24-not-installed-after-it-had-been-installed-by-android-studio-setting.534821/ )确保您的 Target SDK 已安装( https://forum.unity.com/threads/still-target-android-sdk-of-24-not-installed-after-it-had-been-installed-by-android-studio -setting.534821/ )

Then you should be able Build your project.然后你应该能够构建你的项目。 Let us know if it works for you too!让我们知道它是否也适合您!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM