sorry for bad English, I am Russian.
Before building my apk has 1 mb, when must have 50 or more.
When I install apk on device it not appear on main menu, therefore I can not open it. But I see this app in setting/application of my device.
When I build apk errors do not appear.
How to solve it? Please help.
This might seem silly, did you add the scene to Build build settings?
https://docs.unity3d.com/Manual/BuildSettings.html
like the scene should be a part of the build settings
Related
I'm totally new in Unity and C#, and it's the first time I download Unity.
The problem I'm facing is: Evertime I try to create a totally new project or open an official example project should contain no error, the Unity will say that there are compilation errors in my project, just like the screenshot below:
Error pop-up
This situation will happen in any different version of Unity, I have tried these versions: 2021.3.14, 2020.3.42, 2020.3.25, 2019.4.40.
And the error messages in console of each version are different, in 2021.3.14:
Error message in console
(This kind of disorderly code should be Chinese I think, the reason maybe the Chinese encoded question in Unity. But I don't know why, because the Unity Hub and Unity I installed are all from UK website)
In 2020.3.42 and 2020.3.25:
Error message in console
And in 2019.4.40 the error message is just like the error message in 2020 version, just the "Compiler version 3.5.0-dev" changes to "Compiler version 2.9.1" (I don't have the screenshot cause I have deleted the 2019 version).
Here I'll explain the process I download and install Unity:
I just have an anaconda preinstalled in my computer(which is related to the Unity), and for the first time, I also have the Visual Studio2019 installed in my computer(But I try to uninstall VS2019 before install Unity later, it doesn't work). And I download and install the Unity Hub from official website, then install the Unity 2021.3.14 in Unity Hub. That's all the process, I didn't change anything else in the system about Unity. (There is actually one another thing I have done, but I don't think it's a reason. I download the ml-agents plugin in github, and created a new anaconda environment for it, with just python3.6 and pytorch and ml-agents installed. Then I try to add ml-agents in Unity's packages even it's in compilation error state.)
Here is some info about my computer:
UK computer with Windows11, with anaconda, some jdk and SQL installed.
And here is the list of things I have tried, all from internet:
Change the "Api Compatibility Level*" in Edit->Project Settings->Player->Other Settings->Configuration
Download different version of Unity(as mentioned above)
Delete some packages that may cause this problem
Reimport all the assets of the project
Delete the Unity_lic.ulf file in the directory: C:\ProgramData\Unity and let Unity reload it
Somebody says this may be caused by some antivirus program, so I removed all the antivirus program on my computer (except virus defense program of win11, cause I don't know how to close it and I think it is better to not close it), and completely remove all the Unity files on my computer (probably, I don't know), the remove steps are:
(1) Delete the Unity Editor and Unity Hub files directly
(2) Delete temporary file related to Unity:
C:\ProgramData\Unity
C:\Users\Username\AppData\Local\Unity
C:\Users\Username\AppData\Local\unityhub-updater
C:\Users\Username\AppData\LocalLow\Unity
C:\Users\Username\AppData\Roaming\Unity
C:\Users\Username\AppData\Roaming\UnityHub
(3) Remove all the Unity related folders in windows registry(to ensure the thing I'm saying, to open this, press win+R, then type"regedit"):
HKEY_CURRENT_USER\Software\Unity
HKEY_CURRENT_USER\Software\UnityTechnologie
And reinstall the whole Unity in a totally different directory, to avoid the Unity influenced by the folder path name(like too long, or contains Chinese character), I create a new folder F:\Unity, and create four folder"Download", "Editor", "Hub", "Project" to hold download tem files, Unity Editor, Unity Hub and project file respectively. Then I download and install Unity Hub, then install Unity Editor in Unity Hub, create new project, and everything don't change...
P.S. I also download a Unity use the same process as me on the computer of my roommate. His computer is also win11, with anaconda and Visual Studio preinstalled. And everything went right, it just took me several minutes to successfully create a new project.
Can someone tell me what kind of things can influence the download process of Unity (Like other programming environment or IDE)? And how can I fix this problem?
You tried every possible solution maybe it's time to reinstall a clean windows.
I'm beginning my first Xamarin project. I started with setting up an android project and I have gotten it working with the emulator.
But after following the instructions of this video
(https://www.youtube.com/watch?v=mbIvG8ripcw&t=590s&ab_channel=GeraldVersluis)
I get the following error when I try to build:
Expected "!$([System.String]::new('%(ReferenceCopyLocalPaths.Identity)').EndsWith('System.Runtime.dll'))" to evaluate to a boolean instead of "!$([System.String]::new('E:\(PATH TO APP FOLDER)\Notes App\NotesApp\NotesApp\bin\Debug\netstandard2.0\NotesApp.dll').EndsWith('System.Runtime.dll'))", in condition "'$(_CoreFrameworkPackageId)' != ''
AND !$([System.String]::new('%(ReferenceCopyLocalPaths.Identity)').EndsWith('System.Runtime.dll'))
AND '%(ReferenceCopyLocalPaths.NuGetPackageId)' == '$(_CoreFrameworkPackageId)'". NotesApp.UWP
^^ The error code I get for this is MSB4100
I also keep having the Nuget packages Xamarin.Forms and the Microsoft.NETCore.UniversalWindowsPlatform go missing from the references of my project even though they are installed within it. After restarting VS multiple times and toggling on/off settings that alters the project/solution heavily they pop back into existance.
These packages when they go missing give me 10s and I even saw once, 200 errors and they all disappear after turning on and then off again, for example "Compile with .NET Native tool chain" in the build settings.
But the big error above still remains.
========================================
All Nuget packages are up to date and VS is up to date (and I used the repair tool).
I've removed the UWP project and created a new one, and I get the same result.
If anyone can help me solve this and let me know if I've made a silly mistake it would be appreciated. I would like to master this.
If you need any more info let me know, thanks.
Update 1
I've reinstalled my nuget packages and restarted VS and this is my screen. Note I have the package on screen installed but not showing up in my references. Plus some warnings that go away when they feel like it.
Update 2
I created a brand new xamarin android and uwp project template, did not touch a thing, and I tried to build and deploy the uwp project and I get this error
I created a project that was not buring by many layers of folders, in my C drive and not my external exFAT E drive and it now works.
Thanks for your help guys.
Hello everybody,
A few days ago, a new error showed up on my computer: Unity scripts don't work at all. Every time I try to open (new or old) Unity projects, 2 blank errors appear (first screenshot), and when I try to attach a script to a GameObject, and alert dialog box shows (second screenshot). You can also see in the script import settings: "No MonoBehaviour scripts in the file or their names do not match the file name"...
I already tried to uninstall all Unity's related files, reinstall it, uninstall and reinstall Virtual Studio 2019 and SDKs, so if you have an idea of where it could come from, just tell me!
Thanks a lot,
Simon
The problem you're facing is called "Blank Error". Looking for Blank Error Unity you'll find many possible solutions.
For instance:
https://forum.unity.com/threads/four-blank-errors-in-each-new-project.599980/
What fixed it for me was to "install windows update from this link to your 32 bit or 64 bit system accordingly":
https://support.microsoft.com/en-us/help/2533623/microsoft-security-advisory-insecure-library-loading-could-allow-remot
Ok, so I installed MSVC v140 and v141, Unity 2018.4.13f1 and it seems to work now, after this I tried with Unity 2019.2.15f1, and I think there is an error with this version, I had the same problem.
But right now I can use Unity, that's what I wanted, thanks for all people who helped me !
I have to build android app using Unity 2018.4.9f1 with App Bundle (Google play) and I get this error. When building normal apk everything is working fine.
1 exception was raised by workers:
com.android.tools.build.bundletool.exceptions.BundleFileTypesException$FileUsesReservedNameException: File 'root/res/drawable-hdpi/ic_launcher.png' uses reserved file or directory name 'res'.
Tried diffrent unity versions. Tried deleting this file (but looks like it's hidden somewhere or generating during gradle compile)
I'm using Unity 2019.4.0f1 and got stuck in the same error. Here's what I've found on internet and solved.
(you probably got a solution, but it's good for those who will see this post)
Open your project settings > Player > Other Settings, loko for configuration, make sure you ticked this options below:
Player setup
Scripting Backend IL2CPP
Enable ARMv7, ARM64, Split APKs by target architecture
Then in your Build Settings
Build settings setup
Just default values (unity 2019.4 version).
Hope that helps someone :)
[edit 1]
I know this doesn't fix the android bundle app build, I think that's an unity bug, not sure, however this should work fine on google play console (worked for me)
So i'm a programmer who's making a game on visual studio. I save my game on a USB so i can take it everywhere. Unfortunately, i left my USB in my home and when i booted up my PC, it did a scan and repair on my USB (drive (i)). so ,when I tried to open my game it failed and when i looked in the folder, it showed a file called FOUND.000, and my actual folder that had my project in was converted into a file.
I really unsure about what to do. i just want to know if there anything or anyway to restore the .CHK files into normal files
I think John is right I had the similar problem a few months ago and this solution has worked for me, all of my files were hidden after an antivirus scan and this made them visible.
http://visihow.com/Show_Hidden_Files_Using_Command_Prompt
Edit: following the instructions here "might" help you restore your data:
https://www.howtogeek.com/282798/what-are-the-found000-folder-and-file0000chk-file-in-windows/