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

2019.x Android package: Install SDK & NDK Tools #359

Closed
4 tasks done
sp-ricard-valverde opened this issue May 13, 2019 · 14 comments · Fixed by #375
Closed
4 tasks done

2019.x Android package: Install SDK & NDK Tools #359

sp-ricard-valverde opened this issue May 13, 2019 · 14 comments · Fixed by #375
Assignees

Comments

@sp-ricard-valverde
Copy link

sp-ricard-valverde commented May 13, 2019

Issue Checklist

  • I'm using the latest u3d version
  • I ran u3d --help
  • I read the README
  • I made sure that a similar issue doesn't exit

Issue Description

Starting from Unity 2019, the Unity Hub offers the possibility to install 'Android SDK & NDK Tools' along with the Android Build Support package. This makes the provisioning process much more easier as there's no need to open the Editor and download those packages separately.

When listing the packages for Unity 2019(u3d available -p) versions there's no SDK & NDK available, not are they installed when installing the 'Android' package along the Editor(u3d install 2019 -p Unity,Android).

It would be great to have this as u3d could be enough to provision an Android Unity build machine for CI environments.

@sp-ricard-valverde
Copy link
Author

Furthermore, the only way to install the supported Android SDK & NDK is from the Hub at Unity installation time from version 2019 onwards.
If the Unity version is not installed from the Hub there's no apparent way of knowing which SDK & NDK it supports(it's causing strange Editor crashes when mixing SDK & NDK versions for us).

@bdominguez
Copy link

Same problem here... As you also said they hide the specfic NDK version so we can't install it manually neither...

@phil-flyclops
Copy link

phil-flyclops commented Sep 10, 2019

Adding a reference image of the available packages for a 2019 install. It includes android but does not include the nested android packages.
Screen Shot 2019-09-10 at 10 00 42 AM

@sp-ricard-valverde
Copy link
Author

You can now at least install those packages using UnityHub CLI, although the tool is very lacking and error prone if trying to install multiple packages at a time.

@umegaya
Copy link

umegaya commented Oct 21, 2019

@sp-ricard-valverde

You can now at least install those packages using UnityHub CLI

could you elaborate this? do you means we can run /Applications/Unity\ Hub.app/Contents/MacOS/Unity\ Hub from command line like UnityEditor?

@phil-flyclops
Copy link

I'm not sure about the CLI side of things, but if you use UnityHub UI to install the packages you can get similar run ability of different versions of editors to u3d by doing the following, although it misses out on some nice log culling features in u3d

VERSION=`cat ProjectSettings/ProjectVersion.txt | awk '{print $2}' | head -1`
UNITY_PATH="/Applications/Unity/Hub/Editor/${VERSION}/Unity.app/Contents/MacOS/Unity"

# u3d run less-than-ideal-because-of-logging replacement
$UNITY_PATH -batchmode ...

@sp-ricard-valverde
Copy link
Author

@sp-ricard-valverde

You can now at least install those packages using UnityHub CLI

could you elaborate this? do you means we can run /Applications/Unity\ Hub.app/Contents/MacOS/Unity\ Hub from command line like UnityEditor?

Unity Hub introduced the ability to install Unity packages from command line(including ndk and skd), although it's a feature in preview, it's fully working:

https://unity3d.com/hub/whats-new

See version 2.1.0 notes.

@umegaya
Copy link

umegaya commented Oct 23, 2019

@sp-ricard-valverde oic thanks! I missed the update and temporary using https://github.com/sttz/install-unity, which can be installed via homebrew, but it would be nicer if official CLI installer is provided 👍

@bdominguez
Copy link

@lacostej @niezbop

Before Unity showed a button on editor preferences to download the exact version of the NDK, now since it allows you to install from the hub the NDK does not even appear which version to use if you want to download it on your own.

That's why it's very important that from u3d the NDK module appears as downloadable and installable so we can get the expected version.

@niezbop
Copy link
Member

niezbop commented Nov 8, 2019

Hey @bdominguez!

We agree that it's an important feature, and I'm working on it right now 😄 See https://github.com/niezbop/u3d/tree/feature/installer/sdk_ndk

This branch should expand upon the existing modules listing by using the ones the hub offer, including the SDK and NDK plus their tool.

It's still WIP, but I should be able to open a PR and iterate upon it. This will likely be the last feature that we implement before rolling out the next release, so this should come in your hands in the very near future!

In the mean time, Unity documents which NDK you should be running in case you didn't know.

@niezbop niezbop self-assigned this Nov 8, 2019
@bdominguez
Copy link

Thanks @niezbop I didn't know!

@niezbop
Copy link
Member

niezbop commented Nov 12, 2019

Hey everyone!

Just to keep you up-to-date, the feature is nearing completion!

u3d (feature/installer/sdk_ndk) $ u3d install 2019.2.12f1 -p android-ndk
Unity 2019.2.12f1 is already installed
Root privileges are required
Password for paulniezborala:
**********************
No credentials storage available
Android-ndk is already downloaded
--------------------------------------------
--- Installing Android NDK (android-ndk) ---
--------------------------------------------
Installing with /Users/paulniezborala/Downloads/Unity_Packages/2019.2.12f1/android-ndk-r16b-darwin-x86_64.zip
$ chmod a+w /Applications/Unity_2019.2.12f1/PlaybackEngines/AndroidPlayer
Successfully unizpped android-ndk-r16b-darwin-x86_64.zip at /Applications/Unity_2019.2.12f1/PlaybackEngines/AndroidPlayer/NDK

There are of courses a few things to tweak still, and we have to iterate just a bit on a it yet, but if you want to give it a go, and try if it works on your machine you can build it locally (clone the repo and run ./build.sh). Any feedback appreciated!

@bdominguez
Copy link

Great job @niezbop

@niezbop
Copy link
Member

niezbop commented Nov 15, 2019

Hey all.

This has been released as part of u3d 1.2.0! Thanks once again for your patience on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants