I installed unity 2021.3.6f with android build support (NDK and SKD) using unity hub.
Going into a project and attempting to build it on android platform , I get this error :
FileNotFoundException: Failed to find $C:/ProgramFiles/Unity/Hub/Editor/2021.3.6f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\GradleTemplates\mainTemplate.gradle
I looked up in the directory and I don't even have the /Tools folder inside /AndroidPlayer.
Tried to reinstall unity and android module again but even after 2 times of reinstallation I still receive this weird error.
In unity Edit>Preferences>External-Tools>Gradle Installed With Unity is Ticked and marked to the /Tools folder which doesn't even exists
(there is also a warning below that saying I'm missing the recommended Gradle and I should install the recommended version using unity hub. but I already tried reinstalling everything)
I have used the unity android build before and it was always fine, perhaps this happens with the 2021.3.6f version that was released this week.
Can't find any solution to this anywhere, hope you can help.
Found the solution.
looks like the gradle folder has changed from AndroidPlayer\SDK\Tools to AndroidPlayer\SDK\cmdline-tools but the path still the old one inside Unity preferences.
Copy all folders and files inside cmdline-tools, create a new folder called Tools inside AndroidPlayer folder and paste there.
You can consider it as Unity Bug which will be fix in next update.
But for now please do the below workaround to fix this issue.
Go to the below location in the Unity installed folder
/Applications/Unity/Hub/Editor/2021.3.6f1/PlaybackEngines/AndroidPlayer/SDK/cmdline-tools/2.1
Now copy all the files and folders in this folder
Now Go back to the AndroidPlayer folder and create a folder Tools
Now paste copied files/folders in it and click on build and run.
Hope it will fix this issue.
Related
I'm creating a project in Unity Hub, but when I try to open it, it throws an error. This project simply does not exist in the project folder (because of the error and the error). Several times I checked the correctness of the path.
I've reinstalled Unity several times but nothing has changed.
MacOS, path is /Users/Apple/unity_projects. It exists and is listed in the settings.
I reinstalled Unity again and it worked. The only possible problem is a lack of memory, because I did the same thing as before
These DLL files are missing in my project or Unity folder.
How can I find these files again? I reopened my project with a different name and it didn't fix it. I deleted the Library folder, it was recreated, it still didn't fix. I deleted Unity and reinstalled it, still didn't fix it. What should I do?
enter image description here
I installed one of the missing DLLs, namely Terrain Tools, via Package Manager. Then all the other missing DLLs were found. Pretty odd.
I already tried reinstalling unity, installing .net, and installing visual c++
But none of that worked
(info-log.json https://notepad.ltd/4h6hr44m)
It also gives me a (0x000007b) error when i open unity.exe, but that must be because i opened it without a project
derHugo stated that it is because of 'ERROR.PROJECT.PATH_NOT_FOUND' as in the path of the project is missing, but i tried recreating the project and i also couldn't find the default project for unity 2d
Big update thanks to derHugo, The reason this doesn't work is because of the missing project files, unity doesn't create the default files for some reason and i tried everything... :(
BUT when i tried making the folder, it said, not proper project... this means the folder is correct and derHugo is correct, now we need to find out how to let it create the project
Clicking "load default layout" does nothing (just rerenders the alert box), clicking "revert factory settings" also does nothing.
I've googled this issue and the common solution is to reopen unity and to reimport all assests except this is a brand new project. There is nothing in it to import.
I've tried creating a new project and it still gives me this error.
I'm running version 2020.1.5f1 and the target platform is Windows 64-bit
Quit Unity and do the following:
Go to "AppData\Roaming\Unity\Editor-5.x\Preferences\Layouts\default" or "~/Library/Preferences/Unity/Editor-5.x/Layouts/default" for mac, delete LastLayout.dwlt and copy Default.wlt
Paste Default.wlt into the "Library" folder of your project
Delete CurrentLayout-default.dwlt and rename Default.wlt to CurrentLayout-default.dwlt
Reopen Unity and load the project. The editor should open normally. You should now be able to create new projects as usual too.
the simple solution if it has yet to be tried would be to uninstall unity and reinstall.
if you have already tried that try updating to a newer version see if unity 2020.3 works to narrow the problem down a bit more. I had the same problem for me I just updated unity to a newer version and everything worked perfectly.
I tried the solutions posted by #carmelo343 and #Abhishek Dubey, but it still didn't work. My solution was to create the unity project using an older version (I used 2019.3.12f1), which shouldn't cause that layout error, then change the unity version to 2020.1.5f1 in Unity Hub (see below)
Unity Hub
go to "C:\Users<username>\AppData\Roaming\Unity\Editor-5.x\Preferences\Layouts\default"
Copy this file in your project library folder renaming it with "CurrentLayout-default.dwlt" and replace it with the old one.
Worked for me!!
I get this most every time I launch a project in Unity. Then I close and relaunch and all is fine. I am using a personal layout. I am using Unity 2020.1.8f1. These kind of things never happened before 2020 version.
just try this : in unity editor: Help -> Check For Updates -> uncheck the Check For Update
On Windows:
Open your project folder and delete the CurrentLayout-default.dwlt file
Go to "C:\Users<username>\AppData\Roaming\Unity\Editor-5.x\Preferences\Layouts"
Copy Default.wlt file to your project library folder and rename it to "CurrentLayout-default.dwlt"
my project opened normally without the warning.
I solved this by downloading and installing the latest Unity Hub.
I saved my project to a different location and was able to open Unity.
I was trying to clone a project in Eclipse and after copying it into the same directory, I got a lot of build path errors, even after deleting the copy of the project. So, I decided to back up the original project, delete it from the directory and try importing it again. However, when I try to import it I get a "Gradle build daemon disappeared unexpectedly" error. I have looked extensively on this and other sites and found no solution, I tried deleting the .gradle folder as well as several others, to no avail. Can someone please help me?
It didn't fix the problem, but I managed to find a workaround by creating a new LibGDX project with the same name and then copying the 'src' folders from each subproject into their respective folders in the new project. Their were still a few problems with the android version, but once I picked an android target and added 'gen' to the source folders in the build path, it worked.