[英]Issues with building Unity project in Android Studio
I am implementing an external SDK that requires some changes in build.gradle, AndroidManifest.xml and UnityPlayerActivity.java. 我正在实现一个外部SDK,需要对build.gradle,AndroidManifest.xml和UnityPlayerActivity.java进行一些更改。 After implementing this changes direct build from Unity editor into APK file fails. 实施此更改后,从Unity编辑器直接构建为APK文件失败。 The SDK documentation stands that I should export the project and build it from Android Studio, which I tried to do using instructions from this article , but as a result I only got following massage in Android Studio console: SDK文档表明,我应该导出项目并从Android Studio进行构建,这是我尝试使用本文中的说明进行的,但是结果是,我只在Android Studio控制台中进行了以下研究:
15:25:45: Executing task 'build'... 15:25:45:正在执行任务“构建” ...
Executing tasks: [build] 执行任务:[构建]
15:25:45: Task execution finished 'build'. 15:25:45:任务执行完成了“构建”。
and the APK file is nowhere to be found. 找不到APK文件。 I also tried clicking Build > Build APK(s) in Android Studio, but nothing happens. 我还尝试在Android Studio中单击“构建”>“构建APK”,但是什么也没有发生。 I tried it also on new blank Unity Project with same result, so this is probably not the external SDK cousing the problem. 我也在新的空白Unity项目上尝试了相同的结果,因此这可能不是解决问题的外部SDK。
How do I build a Unity project in Android Studio? 如何在Android Studio中构建Unity项目?
Turns out I was importing wrong directory to Android Studio. 原来我将错误的目录导入Android Studio。
What I was doing (wrong): 我在做什么(错):
What I should have been doing (right): 我应该做的事情(右):
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.