AgoraIO / Voice-Call-for-Mobile-Gaming

42 stars 53 forks source link

No overload for method `SetClientRole' takes `1' arguments #6

Closed daxini closed 5 years ago

daxini commented 5 years ago

I get the following error when I follow the instructions for Unity3D (2018.3.0f2) version of "Advanced-Voice-Call-for-Gaming"

Assets/GameScene/Scripts/GameController.cs(254,15): error CS1501: No overload for method SetClientRole' takes1' arguments

It works for Hello-Unity3D-Agora but I only get a msg of joining or leaving a channel but no actual voice is tx/rx. Please help get voice communication working in the sample app.

zhangtao1104 commented 5 years ago

@daxini
1: The reason why you got the error is that you didn't get the latest SDK. I've adapted the master branch to amg_2.1 to fix the problem.

2: You need to run Hello-Unity3D-Agora in two device ,you must ensure the appId and the channelName is the same and you will hear the voice.

Please try again, thanks !

daxini commented 5 years ago

I got the SDK from http://download.agora.io/sdk/release/AMG_Voice_Unity3D_HD_v2_1.zip and followed the instructions to replace the android, ios and scripts files, earlier and again so not sure why I didnt have the lastest SDK. But tried again and now I get the following error...

CommandInvokationFailure: Gradle build failed. /home/scd/Unity/Hub/Editor/2018.3.0f2/Editor/Data/PlaybackEngines/AndroidPlayer/Tools/OpenJDK/Linux/bin/java -classpath "/home/scd/Unity/Hub/Editor/2018.3.0f2/Editor/Data/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-4.6.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

stderr[

FAILURE: Build failed with an exception.

BUILD FAILED in 0s ] 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.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action1 progress, System.String error) UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action1 progress) Rethrow as GradleInvokationException: Gradle build failed UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, 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) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

I get this error both for "Voice-Call-for-Mobile-Gaming/Advanced-Voice-Call-for-Gaming/Spacewar-with-AMG-Voice-SDK-Unity/" as well as "Video-Call-for-Mobile-Gaming/Hello-Video-Unity-Agora/"