translate this page
20170109
Editing AndroidManifest.xml in Unity to deal with "CommandInvokationFailure: Gradle build failed"
When I tried to Build&Run an Android build with 'Development Build' flag in the Unity Editor, I got this error message at the last moment of the build progress, after a long waiting.
CommandInvokationFailure: Gradle build failed.
C:/Program Files/Java/jdk1.8.0_112\bin\java.exe -classpath "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-2.14.jar" org.gradle.launcher.GradleMain "assembleDebug"
stderr[
C:\Dir\UnityProjects\Prototype\Temp\StagingArea\gradleOut\src\main\AndroidManifest.xml:4:83-108 Error:
Attribute application@debuggable value=(true) from AndroidManifest.xml:4:83-108
is also present at [:OVRPlugin:] AndroidManifest.xml:3:148-174 value=(false).
Suggestion: add 'tools:replace="android:debuggable"' to <application> element at AndroidManifest.xml:4:3-13:17 to override.
FAILURE: Build failed with an exception.
As the highlighted lines indicated, there was a problem while mixing multiple manifest files during the build. And the message kindly informed me what to do.
Then where should I put my editable AndroidManifest.xml in the project tree?
By googling, I could find this.
1. Copy this file
: PathToUnityEditorInstallDir(normally "C:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\androidplayer") \ AndroidManifest.xml
2. Paste onto this path
: Assets\Plugins\Android\AndroidManifest.xml
3. Edit the file as needed to deal with the error.
After doing so, I could successfully build my test APK and run on a device.
4. *When building a release version of APK, let's not forget to reset that android:debuggable="true" value to "false".
Hope it helps :)
Subscribe to:
Post Comments
(
Atom
)
Popular Posts
-
When I tried to Build&Run an Android build with 'Development Build' flag in the Unity Editor, I got this error message at the...
-
유니티에서 자동으로 추가시키는 안드로이드 매니페스트 퍼미션을 제거하는 것이 가능하다는 도큐먼트를 발견했습니다. (...) Unity automatically adds certain permissions to the manifest. The log...
-
디버그 로깅 라인을 넣는 간단한 방법으로 세가지 키입력 관련 메소드들 - Input.GetKey(), Input.GetKeyDown(), Input.GetKeyUp() -이 언제 true를 반환하는지 확인해 보았습니다. (Unity Edito...
-
유니티 에디터(버전 5.5)에서 Build&Run을 통해 디벨롭 버전 apk를 빌드하려 했을 때 마지막 단계에 가서 아래와 같은 에러가 발생 했습니다. CommandInvokationFailure: Gradle build failed....
-
I found this useful document as to removing automatically generated AndroidManifest permissions in Unity. (...) Unity automatically adds ...
-
I tested the three key-reading methods - Input.GetKey(), Input.GetKeyDown(), and Input.GetKeyUp() - to check when they return true, by...
No comments :
Post a Comment