Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push kit #367

Closed
Ammad6465 opened this issue Sep 23, 2022 · 21 comments
Closed

Push kit #367

Ammad6465 opened this issue Sep 23, 2022 · 21 comments
Labels
timeout and closed A month passed after the solution was given.

Comments

@Ammad6465
Copy link

Ammad6465 commented Sep 23, 2022

Could not determine the dependencies of task ':unityLibrary:HMSUnityPushKit.plugin:compileReleaseAidl'.

@bunyamineymen
Copy link
Collaborator

Hi,
We are starting to analyze this problem.

@bunyamineymen bunyamineymen added the investigating We are investigating the current problem label Sep 23, 2022
@bunyamineymen
Copy link
Collaborator

Could you please define the problem in more detail and share the logs with us?

@bunyamineymen bunyamineymen added the details requested Details requested for the issue label Sep 23, 2022
@Ammad6465
Copy link
Author

Ammad6465 commented Sep 23, 2022 via email

@Ammad6465
Copy link
Author

Is it enough?
Need any more details?

@bunyamineymen
Copy link
Collaborator

yes, enough for now.

@Ammad6465
Copy link
Author

Ammad6465 commented Sep 23, 2022 via email

@bunyamineymen
Copy link
Collaborator

bunyamineymen commented Sep 23, 2022

I think your android license files are missing. Can you control them on the android SDK path?

image

image

image

@Ammad6465
Copy link
Author

Ammad6465 commented Sep 23, 2022 via email

@Ammad6465
Copy link
Author

Ammad6465 commented Sep 23, 2022 via email

@bunyamineymen
Copy link
Collaborator

bunyamineymen commented Sep 23, 2022

Our documentation doesn't involve the solution to this problem for now.
The difference in the unity version is not important.

@EvilMindDevs EvilMindDevs deleted a comment from Ammad6465 Sep 23, 2022
@EvilMindDevs EvilMindDevs deleted a comment from Ammad6465 Sep 23, 2022
@bunyamineymen bunyamineymen removed the investigating We are investigating the current problem label Sep 23, 2022
@bunyamineymen
Copy link
Collaborator

bunyamineymen commented Sep 23, 2022

After controlling the license files we can continue analyzing issue clearly.

@bunyamineymen bunyamineymen added the waiting for confirmation The solution has been given label Sep 23, 2022
@alihan98ersoy
Copy link
Collaborator

alihan98ersoy commented Sep 26, 2022

If the problem continues, I have a small demo for you.
How to resolve Failed to install the following Android SDK packages as some licenses
have not been accepted.

licenses.mp4

or you can run this command:
Unity\Hub\Editor\{yourUnityVersion}\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\bin\sdkmanager.bat --licenses

@Ammad6465
Copy link
Author

This problem is solved but I can't test the push kit working because when I get the push token and put it in console for test push it shows me the prompt wrong.
my push token is
IAAAAACy0vaHAADQsogg-3tij277yB8SYfoHUXwOv2C20r3fAvoO_Lhi1EtS2nK_hWuWUGDn4mLHwCZdFq8Omd6Zdle-osgINti_vFRk8Vca3VR8Eg
Screenshot_20220926_173940_com fury shooting strike2020 huawei (1)

@alihan98ersoy
Copy link
Collaborator

@Ammad6465
Copy link
Author

Ammad6465 commented Sep 27, 2022 via email

@saadimam08
Copy link

after doing #367 (comment) I am getting this whenever I try to build the project
.....................................................................................Error 1
FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ':unityLibrary:HMSUnityPushKit.plugin:generateReleaseRFile'.

Failed to install the following SDK components:
build-tools;28.0.3 Android SDK Build-Tools 28.0.3
The SDK directory is not writable (C:\Program Files\Unity\Hub\Editor\2019.4.30f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK)

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 15s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

UnityEngine.GUIUtility:ProcessEvent (int,intptr)

............................................................--------------------------------Error 2----------------------------------------------------------------

CommandInvokationFailure: Gradle build failed.
C:/Program Files/Unity/Hub/Editor/2019.4.30f1/Editor/Data/PlaybackEngines/AndroidPlayer\OpenJDK\bin\java.exe -classpath "D:\Saad\Extra Gradels\gradle-5.4.1\lib\gradle-launcher-5.4.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

stderr[

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ':unityLibrary:HMSUnityPushKit.plugin:generateReleaseRFile'.

Failed to install the following SDK components:
build-tools;28.0.3 Android SDK Build-Tools 28.0.3
The SDK directory is not writable (C:\Program Files\Unity\Hub\Editor\2019.4.30f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK)

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 15s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
]
stdout[
Starting a Gradle Daemon, 1 incompatible and 4 stopped Daemons could not be reused, use --status for details

Configure project :launcher
WARNING: DSL element 'useProguard' is obsolete and will be removed soon. Use 'android.enableR8' in gradle.properties to switch between R8 and Proguard..
WARNING: DSL element 'useProguard' is obsolete and will be removed soon. Use 'android.enableR8' in gradle.properties to switch between R8 and Proguard..
--W- Build Environment: AGConnect plugin version is: 1.6.5.300, Gradle version is: 5.4.1, Android Plugin version is: 3.5.4
--I- Using the AGConnect-Config file: D:\Saad\Projects\Huawei US Police Car Transport Truck V 45 (1.0.44)\Temp\gradleOut\launcher\agconnect-services.json
--W- The variant: debug, Use the json file: D:\Saad\Projects\Huawei US Police Car Transport Truck V 45 (1.0.44)\Temp\gradleOut\launcher\agconnect-services.json
--I- Using the AGConnect-Config file: D:\Saad\Projects\Huawei US Police Car Transport Truck V 45 (1.0.44)\Temp\gradleOut\launcher\agconnect-services.json
--W- The variant: release, Use the json file: D:\Saad\Projects\Huawei US Police Car Transport Truck V 45 (1.0.44)\Temp\gradleOut\launcher\agconnect-services.json
Checking the license for package Android SDK Build-Tools 28.0.3 in C:\Program Files\Unity\Hub\Editor\2019.4.30f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\licenses
License for package Android SDK Build-Tools 28.0.3 accepted.
Preparing "Install Android SDK Build-Tools 28.0.3 (revision: 28.0.3)".
Warning: Failed to read or create install properties file.
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at :0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at :0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at :0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action1[T] progress, System.String error) (at <a83396a2554740a886f5ffb57e40eb15>:0) UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action1[T] progress) (at :0)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at :0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :0)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at :0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :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 :0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at :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 :0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

@alihan98ersoy
Copy link
Collaborator

The problem here is that the unity editor doesn't have read-write permission. I am using unity hub and unity hub is running unity editor. If you have the same situation, if you run the Unity hub as an administrator, the problem will be solved. (Unity editor needs to run as administrator)

@saadimam08
Copy link

should I do the same for 2020 unity version?

@alihan98ersoy
Copy link
Collaborator

I am not sure. It's okay until you get the same problem, but after you get it you can restart the unity and hope the problem goes away or try to fix it. This is how I solved it. There may be other solutions on the internet.

@alihan98ersoy alihan98ersoy added timeout and closed A month passed after the solution was given. and removed waiting for confirmation The solution has been given details requested Details requested for the issue labels Oct 7, 2022
@Ammad6465
Copy link
Author

Ammad6465 commented Oct 11, 2022 via email

@alihan98ersoy
Copy link
Collaborator

If you run the unity editor as administrator, I believe the problem will solve

@alihan98ersoy alihan98ersoy reopened this Oct 11, 2022
@alihan98ersoy alihan98ersoy added waiting for confirmation The solution has been given and removed timeout and closed A month passed after the solution was given. labels Oct 11, 2022
@alihan98ersoy alihan98ersoy added timeout and closed A month passed after the solution was given. and removed waiting for confirmation The solution has been given labels Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
timeout and closed A month passed after the solution was given.
Projects
None yet
Development

No branches or pull requests

4 participants