How to install android build support for unity manually (unity hub)? - unity3d

I used Unity Hub downloaded latest Unity Editor, it works fine for editor,document and language packs, but can not download android build support. Just told me download failed many many times in the past two days.
So I downloaded UnitySetup-Android-Support-for-Editor-2018.2.16f1.pkg from webpage. This package install reported failed at the end of every try.This package size(348.9M) is not same as the one showed(365.8M) in UnityHub download list.
There is a 2017 version Unity Editor installed by download **.pkg, but the support installer never ask me about Editor's location.
Is there some way to install android build support manually?
Thanks for any tips.

This worked for me. To anyone facing this problem. I apologize for my long explanation and my english.
You can verify if *.pkg file is complete by comparing the checksum (I use dolphin)
Execute this command to manually install your UnitySetup-Android-Support-for-Editor-*.pkg
:~> ./UnitySetup-2019.1.0f2 -u --use-component-list
unity-2019.1.0f2-linux.ini --install-location $HOME/2019.1.6f1/ -d
$HOME
Note that the unity version must be compatible, otherwise you will have the error unable to initialize the Unity engine in you android device. I use:
UnitySetup-Android-Support-for-Editor-2019.1.6f1
Unity-2019.1.6f1
As much as possible use unity hub to install the android add-on, I use unity hub 2.0.1
Step by step explanation of the installation manually of *.pkg
The problem :(
I will put them in context.
I use opensuse tumbleweed. My problem was that I did not have android build support.
No Android module loaded image, and when I press open download page, the browser shows me a message:
<Error> <Code>AccessDenied</Code> <Message>Access denied.</Message> <Details> Anonymous caller does not have storage.objects.get access to publishing-unity-binaries-prd/6e9a27477296/Unknown/UnitySetup-Android-Support-for-Editor-2018.3.0f2. </Details> </Error>
and I can not do anything else.
The SOLUTION :)
0.- Previous requirements
I already had my previous installation this file:
UnitySetup-2019.1.0f2
1.- Download UnitySetup-Android-Support-for-Editor-2019.1.x.pkg
To achieve this look for UnitySetup-Android-Support-for-Editor- in the file https://public-cdn.cloud.unity3d.com/hub/prod/releases-linux.json
This is a fragment of release-linux.json file
...
{
"id": "android",
"name": "Android Build Support",
"description": "Allows building your Unity projects for the Android platform",
"downloadUrl": "h ttps://download.unity3d.com/download_unity/f2970305fe1c/MacEditorTargetInstaller/UnitySetup-Android-Support-for-Editor-2019.1.6f1.pkg",
"category": "Platforms",
"installedSize": 1958542000,
"downloadSize": 664332318,
"visible": true,
"selected": false,
"destination": "{UNITY_PATH}/Editor/Data/PlaybackEngines/AndroidPlayer",
"checksum": "d00addecefb7babcb9cd6a8085672908"
}
...
What interests us about this file is the url to download https://download.unity3d.com/download_unity/f2970305fe1c/MacEditorTargetInstaller/UnitySetup-Android-Support-for-Editor-2019.1.6f1.pkg and the checksum.
2.- Component list file
Download the file from the list of components from here or create a file like unity-2019.1.0f2-linux.ini:
[Android]
title=Android Build Support
description=Allows building your Unity projects for the Android platform
url=MacEditorTargetInstaller/UnitySetup-Android-Support-for-Editor-2019.1.6f1.pkg
md5=d00addecefb7babcb9cd6a8085672908
install=true
mandatory=false
size=365578263
installedsize=1259081000
requires_unity=false
for [Android] install=true, the url and md5 which is the checksum from the previous step (or again I get md5 with dolphin to verify)
3.- Installation
Have the following files in the same directory that in my case are in $HOME
UnitySetup-2019.1.0f2
UnitySetup-Android-Support-for-Editor-2019.1.6f1.pkg
unity-2019.1.0f2-linux.ini
Finally, execute the following command line. (Note that my current unity installation is in $HOME/2019.1.6f1/).
:~> ./UnitySetup-2019.1.0f2 -u --use-component-list unity-2019.1.0f2-linux.ini --install-location $HOME/Unity-2019.1.6f1/ -d $HOME
Thanks
Source
https://forum.unity.com/threads/installing-android-build-support-and-other-build-support-post-installation.515436/
https://forum.unity.com/threads/how-to-install-editor-packages.554977/

Download the Android Sdk Manager under Command line tools only.
And download the SDK you need, then link it to Unity.
I usually download AndroidStudio and it comes with a GUI manager.
Here is some more info about how to update sdk tools.
You link it here: Edit/Preferences/External Tools

According to this:
Possible causes could be:
A corrupt package (download again manually from the list of individual
packages)
Filesystem corruption (repair disk from single-user mode, reboot and
try again)
The user account somehow not being in the sudoers group (deeper
technical problem - check Apple's forums)
Package file stored on a drive formatted weirdly, so execute
permissions aren't set correctly (pre-/post-installation script won't
run; move to boot drive)

Add Unity modules on Linux manually:
Download pkg:
Head to this page, select your specific unity version from the dropdown at the right.
For those modules that arent listed in linux section, download the pkg from the mac section.
Extract the pkg. you can use any of these:
Files
Archive Manager
7z x -o* UnitySetup-XXXXXX-Support-for-Editor-2022.1.16f1.pkg
bsdtar -xf UnitySetup-XXXXXX-Support-for-Editor-2022.1.16f1.pkg TargetSupport.pkg.tmp/Payload
Move the extracted "Payload" file to one of these directories:
For Android Build Support:
{UNITY_PATH}/Editor/Data/PlaybackEngines/AndroidPlayer
For Windows Build Support (Mono) & Widows Dedicated Server Build Support:
{UNITY_PATH}/Editor/Data/PlaybackEngines/WindowsStandaloneSupport
For Mac Build Support (Mono) & Mac Dedicated Server Build Support:
{UNITY_PATH}/Editor/Data/PlaybackEngines/MacStandaloneSupport
4. Now decompress and extract Payload:
zcat Payload | cpio -iu && rm Payload
or if it's named Payload~ just extract it:
cpio -iu < Payload~ && rm Payload~

Related

Install4j is not keeping link in prebuild JREs for MacOS

in our install4j script we are using a prebuild jre. The tar.gz file contains a link for MacOS and Linux. When installing on linux, the link is kept. When installing on MacOS (in Version 8.0.8, it did work in 8.0.4), the link is replaced by a real file.
Contents/MacOS/libjli.dylib -> ../Home/jre/lib/jli/libjli.dylib
After installing, the file Contents/MacOS/libjli.dylib is not a link any more, but a real file. It seems that the Eclipse-launcher has a problem with this, it does not start with this error:
Error: could not find libjava.dylib
Failed to GetJREPath()
If the file Contents/MacOS/libjli.dylib is changed back to a link, the Eclipse-Launcher will start again.
I have a temporary solution in my setup.install4j script to remove that file and create a link (action for both exists), but it would be nice to to modify the links in the tar.gz of a prebuild jre.
To be able to fully sign and notarize a JDK bundle on macOS, the file Contents/MacOS/libjli.dylib cannot be a symlink.
See
https://bugs.openjdk.java.net/browse/JDK-8235687
These are new requirements from Apple that have been introduced by notarization.
However, recent JDK versions fix the problems introduced by that change:
https://bugs.openjdk.java.net/browse/JDK-8238225

Where does `pub get` download pubspec dependencies to?

In javascript, we have NPM and the node_modules folder in every project. I was not able to find a similar concept for Dart/ Flutter, except the build folder in my app, which contains a folder of a few dependencies I have in pubspec.yaml. It doesn't have any of the source code though, and I think it's actually built from something else. I've also looked in /usr/local/flutter/packages which is where my flutter is installed, but it only shows flutter_driver, flutter_goldens, and more seemingly unrelated folders.
I guess if wanted to read the source code, I really need to find the repo and read from that, or is there a location for dependencies I haven't looked?
I even found projectDir/.dart_tool/pub, which didn't have any of my packages.
From the documentation:
Dependencies downloaded over the internet, such as those from Git and
the pub.dev site, are stored in a system-wide cache. This means that
if multiple packages use the same version of the same dependency, it
only needs to be downloaded and stored locally once.
By default, the system package cache is located in the .pub-cache
subdirectory of your home directory (on Mac and Linux), or in
%APPDATA%\Pub\Cache (on Windows; the location might vary depending on
the Windows version). You can configure the location of the cache by
setting the PUB_CACHE environment variable before running pub.
So for Mac and Linux for example, this would be ~/.pub-cache/hosted/pub.dartlang.org by default.
In Android Studio
I could directly view the source code of the package under `
[External Libraries/Dart Packages/Your Packages]
`
You can get pubspec downloaded from your flutter sdk location .
/flutter/.pub-cache/hosted/pub.dartlang.org/
You can also clone package git .
If you are running Windows as your OS, you can find the packages under the folder that you installed your Flutter SDK to when setting up Android Studio.
In my case - using Windows 10 - the path is as follows, where C:\ is my primary harddrive and flutter\ the folder containing the Flutter SDK...
C:\flutter\.pub-cache\hosted\pub.dartlang.org\english_words-4.0.0
The above path for instance points to the "english words package", containing the most ~5000 used English words and some utility functions, which are mentioned and used in the Flutter tutorial on their official page for writing and running your first Flutter app.
https://pub.dev/packages/english_words
If you have installed flutter using snap then the location might be
/home/user/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org
I had forgotten that I've been command + clicking into these libraries all the time in VSCode.
However, it looks like packages are not stored in the app folder. Packages that we use in our projects are downloaded to $FLUTTER_PATH/.pub-cache, so if I'm looking for camera picker plugin, its in
/usr/local/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.5+2/lib/image_picker.dart
If you are using VScode you can find these dependencies under the dependencies window:

Why I can't sideload my .appx file and why it's nowhere to be found?

My question is very simple and yet very complex.
I need to side load my application's .appx file to SurfacePro (Microsoft tablet with windows10) but I cannot side-load it because there's nothing to side-load...
I've created a simple unity project and switched the build to Universal Windows Platform (UWP)
I've made sure I have the latest IIL2CPP on my machine and all the needed libraries on my VisualStudio 2017
I build the unity project in a dedicated directory - the build resulted with success and the directory had a solution file = .sln file.
I double clicked the .sln file and opened it in VS 2017
In VS2017 I chose "Master", "X86" and "local Machine" (I then tried "device" and "remote machine" this gave errors) and build worked!
I then saw my application's "made with unity" logo and the scene
I close the application using Alt+F4
I want to re-open the application but I can't find the file! I understand this is a file that need to be side-loaded to my machine, similarly to .apk files which loaded and installed on android devices
I can't find the .appx file
I understand that I need to run the build each time I need to open the application, is that true?
I have no experience with the Unity side of this...
but to create the packages for a UWP application, you would right-click the Universal Windows project and choose Store-->Create App Packages.

install4j launcher issue on Mac OSX app store application

We’re using install4j to create installers for our Java application, PDF Studio.
We’re currently trying to submit our application to the Apple store and for this, need a pkg file. We’ve created a pkg file from the Application folder that is created after running the dmg installer created by install4j and are working on removing one by one all the warnings and errors reported by the Apple store.
One issue we are having is that symlinks are not allowed by the Apple store and the JRE contains a symlink for a file called libjli.dylib.
When we try to remove the symlink or replace it with the actual file, the i4j launcher for our application is broken.
When we remove the file from the install folder:
rm /Applications/PDF\ Studio\ 2018.app/Contents/PlugIns/jre.bundle/Contents/MacOS/libjli.dylib
We get an error message on launch saying "Java SE 8" couldn't be loaded because it's executable couldn't be located."
If we try to copy the file to the symlink location:
cp /Applications/PDF\ Studio\ 2018.app/Contents/PlugIns/jre.bundle/Contents/Home/jre/lib/jli/libjli.dylib /Applications/PDF\ Studio\ 2018.app/Contents/PlugIns/jre.bundle/Contents/MacOS
Then the launcher fails with no error message dialog.
If we run with install4j log enabled:
INSTALL4J_LOG=yes /Applications/PDF\ Studio\ 2018.app/Contents/MacOS/JavaApplicationStub
Then it will print "Error: could not find libjava.dylib."
Has anyone tried to do this and made it work?
It seems like the launcher is looking under /MacOS/libjli.dylib. We think it is the JavaApplicationStub executable file that decides where to look which is created by install4j.
Is there is a way to set where the launcher looks for the jre.bundle executable libjli.dylib?
You can extract the DMG and edit the Info.plist file so that it contains
<key>CFBundleExecutable</key>
<string>../Home/jre/lib/jli/libjli.dylib</string>
We will check if we can do this in general.

After updating unity to latest version, the unity launcher is blank

Yesterday I updated my unity to latest version..
Then the launcher is blank.
And when i open any .unity file.. It opens the editor with a error.
Error loading file:///C%3A%2FUsers%2FBuckyDroidz%2FAppData%2FRoaming%2FUnity%2FPackages%2Fnode_modules%2Funity-editor-home%2Fdist/index.html#/login
Unity is still working and running the project.. But unity launcher is not working
After searching on google I found a fix. I mean I have to add some file in package folder.. But there was a link to download those files and the link is dead...
Help Me!!
Looking at your SO username, it looks like this is a problem with your computer username.The D in your name is probably "Ď" or some other character and Unity is having problem reading that file path(C:/Users/username/AppData/Roaming/Unity/Packages/node_modules/unity-editor-home/dist/index.html#/login). This causes license check to fail.
Two things to try:
Method 1.
Change your username
A.Change your name to valid English characters
B.Uninstall and install Unity again to recognize that change.
If this does not fix your problem, do method 2.
Method 2
Do manual Activation
A.Disconnect your internet/wifi.
B.Open Unity. Go to Help -> Manage License
C.Click on Manual Activation.
D.Click on Save License or Save License Request(Depends on Unity version)
E.Connect to your internet/wifi.
F.Go to https://license.unity3d.com/manual then upload that saved license there. Follow steps to on the website to create a license on that website. Make sure to chose free unity version as the license type. When everything is done, you will be able to download a key file. Download that file.
G.Disconnect your internet/wifi again.
H.Open Unity. Go to Help -> Manage License
I.Click on Manual Activation.
J.Click on Load License then choose the file you downloaded from step F.
You can now connect to your internet/wifi again. Restart Unity and test if the problem is still there.
This is a issue with 2017.2 as well
To fix
go to C:\Program Files\Unity\Editor\Data\Resources\Packages
You can see 4 tgz files
unity-editor-home.0.8.30.tgz
unityeditor-cloud-hub-0.0.15.tgz
unityeditor-collab-history.0.6.14.tgz
unityeditor-collab-toolbar.0.7.15.tgz
Use an unarchive program (I used 7-zip file manager) to open each one of these and extract contents (dist folder and package.json file) to your Roaming folder
C:\Users\YOURUSERNAME\AppData\Roaming\Unity\Packages\node_modules
After extract, the folder looks like this..
..\AppData\Roaming\Unity\Packages\node_modules\unity-editor-home
..\AppData\Roaming\Unity\Packages\node_modules\unityeditor-cloud-hub
..\AppData\Roaming\Unity\Packages\node_modules\unityeditor-collab-history
..\AppData\Roaming\Unity\Packages\node_modules\unityeditor-collab-toolbar
and unity-editor-home like below (one level subfolders shown)
..\AppData\Roaming\Unity\Packages\node_modules\unity-editor-home\dist
..\AppData\Roaming\Unity\Packages\node_modules\unity-editor-home\package.json
..\AppData\Roaming\Unity\Packages\node_modules\unity-editor-home\README.md