CommandInvokationFailure: Gradle build failed. 

D:/Program Files/Java/jdk1.8.0_191\bin\java.exe -classpath "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.0.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease"


stderr[


FAILURE: Build failed with an exception.


* What went wrong:

A problem occurred configuring root project 'gradleOut'.

> Could not resolve all dependencies for configuration ':_debugApk'.

   > A problem occurred configuring project ':Firebase'.

      > No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android


* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


BUILD FAILED in 3s

]

stdout[


]

exit code: 1

UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)

UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)

UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1 progress, System.String error)

UnityEditor.Android.GradleWrapper.Run (System.String workingdir, System.String task, System.Action`1 progress)

Rethrow as GradleInvokationException: Gradle build failed

UnityEditor.Android.GradleWrapper.Run (System.String workingdir, System.String task, System.Action`1 progress)

UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)

UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)

UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)



해결방법 1

https://happyryu.tistory.com/138

C:\Users\[윈도우계정 폴더]\.gradle\caches


caches 폴더에 내용 삭제


해결방법 2

http://www.gamecodi.com/board/zboard-id-GAMECODI_Talkdev-no-5041-z-0.htm


유니티에서 제공하는 NDK 의 toolchains 를

Android Studio 에서 설치한 sdk/ndk-bundle/ 로 복사하거나 ndk-bundle 폴더를 삭제 



본인은 2번으로 해결됨

'Unity 3D > 문제 해결' 카테고리의 다른 글

IOException: Win32 IO returned 232 문제 해결  (0) 2019.01.07
Posted by Deadpool
,

https://onesignal.com/ 에 접속하여 Add App


Goole Android 선택



Firebase에서 Server Key와 Sender ID를 복사하여 붙여넣음


Unity 선택



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
 
public class OneSignalPushTest : MonoBehaviour
{
    void Start()
    {
        // Enable line below to enable logging if you are having issues setting up OneSignal. (logLevel, visualLogLevel)
        OneSignal.SetLogLevel( OneSignal.LOG_LEVEL.INFO, OneSignal.LOG_LEVEL.INFO );
 
        OneSignal.StartInit( "App-ID 입력" )
        .HandleNotificationOpened( HandleNotificationOpened )
        .EndInit();
 
        OneSignal.inFocusDisplayType = OneSignal.OSInFocusDisplayOption.Notification;
    }
    public static void HandleNotificationOpened( OSNotificationOpenedResult result )
    {
        Debug.Log( "[HandleNotificationOpened] " + result.notification.ToString() );
    }
}
cs


Unity SDK import 하고 코드 추가, App-ID 입력

https://documentation.onesignal.com/docs/unity-sdk-setup


apk 빌드하고 실행하면 Device가 등록되었다고 뜸


Check Subscribed Users 누르면 성공했다고 뜨고 Done 을 클릭하면 메세지 보낼 준비 완료



https://onesignal.com/apps/6047f21b-c7d5-4818-b6be-119c61904395/campaigns

Project Dash board로 들어가 Messages -> New Push로 메세지 전송


Posted by Deadpool
,


안드로이드 빌드시 발생한 에러

Unity를 C 드라이브에 설치하고 프로젝트를 D 드라이브에서 작업하고 있었던 상황

프로젝트를 C 드라이브로 옮겼더니 해결됨 

Unity와 프로젝트 드라이브가 다르면 발생하는 에러인듯

'Unity 3D > 문제 해결' 카테고리의 다른 글

CommandInvokationFailure: Gradle build failed  (0) 2019.01.29
Posted by Deadpool
,