Export Unity Project and Build with Android Studio Tutorial (April 2022)

  Рет қаралды 47,070

SlothGameGuy

SlothGameGuy

Күн бұрын

Пікірлер: 67
@mihaithemystic2890
@mihaithemystic2890 Жыл бұрын
Unity team is slowly building a majestic tomb stone for their engine, errors over errors, and no support at all for users who can't have internet connection all the time.
@anthonygirdler606
@anthonygirdler606 2 жыл бұрын
Hi. I'm stuck on install latest Android API. 2:30 My latest is Android API 33. (I notice yours is API 32...why didn't you install it ?) I get the following error: SDK Path: C:\Program Files\Unity\Hub\Editor\2021.3.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK Packages to install: - Android SDK Platform 33 (platforms;android-33) Preparing "Install Android SDK Platform 33 (revision: 2)". Failed to read or create install properties file. Failed packages: - Android SDK Platform 33 (platforms;android-33)
@slothgameguy
@slothgameguy 2 жыл бұрын
Good question. I don’t have a super good answer for you. I think the reason I installed through android 12 and not up through API32 or in your case API33 is because I was releasing game for the latest current supported operating system, which is Android 12. I assume installing the other APIs lets you access certain attributes that will be available on future versions of the OS. For example, API33 is for Android 13, which is in Beta. My best guess is if you install the ones specifically noted as “Android ‘#’” that you’re building for a fully released OS with defined functionality. I also notice your SDK Path is your Unity folder. I actually use the android studio default folder. When I was using Unity for builds, I’d install files via Android Studio and then copy the files over to the Unity directory. Now I don’t bother building with Unity though. I hope this helps. Start by installing up to Android 12 and ignoring the ones labeled “API #” for now. Android 12 is still most current. Hope that helps.
@anthonygirdler606
@anthonygirdler606 2 жыл бұрын
Thanks for the reply@@slothgameguy Should I install all Android SDK's ? 2.1, 2.2.......11, 12 ? I'm trying to setup picture in picture which apparently only works in 26+....so maybe I only install Android 8.0, 8.1, 9.0, 10.0, 11.0 and 12.0. How do I change the SDK path ? Edit: Found the SDK path in the same area as the SDK's. (Just above.) Have now changed the path and things seem to be installing without errors. Still don't know if I should install ALL of the old SDK's.
@slothgameguy
@slothgameguy 2 жыл бұрын
@@anthonygirdler606 I’m fairly sure you can just install the latest, Android 12, and it will work. But it can’t hurt to install the others too. Most of the downloads of my game come from Android 10/11/12 of that gives you any clues on what OS to target. I’m not 100% sure how the Android Studio software works entirely in that regards, so might as well install the last 3-4 SDKs I’d say. If you pause my video, you can see which ones I installed and mimic that for now I think and be ok.
@muajin
@muajin Жыл бұрын
Everytime I go to build, i always get a debug folder and not the apk. I also have a buildmethod error message. Im using 2021.3.25
@Renagade01
@Renagade01 7 ай бұрын
2:31 why did u skip something ?
@ggm3780
@ggm3780 2 жыл бұрын
Please help me I can't export unity project from unity But if i export my unity project from unity to android studio Can I upload it to Google play?
@slothgameguy
@slothgameguy 2 жыл бұрын
Yes. Android studio app bundles are for Google Play. You will take the resulting build and upload that via the Google Play Console.
@SaviorsVoiceNYC
@SaviorsVoiceNYC 2 жыл бұрын
this amazinggggggg
@anthonygirdler606
@anthonygirdler606 2 жыл бұрын
At 4:30 you've said we should find android:exported="true" in a couple of places in the manifest. I'm pretty sure I've followed all of your steps. (export, open in android studio, install android 12 sdk, upgrade gradle, delete enableR8 ) and I don't have this. You said "If your project has been upgraded" What project are you referring to and how do I upgrade it ? The application seemed to build anyway...so....does it matter ?
@slothgameguy
@slothgameguy 2 жыл бұрын
If you open AndroidManifest.xml in your project, this is where you can find the android:exported=“true” code. It will only show up for the lines of code that are , , and . All others won’t have the “android:exported” code. So if your project is compliant with Android 12, you can open the manifest and find a section labeled and it should also say “android:exported=“true””. If it doesn’t it’s not compliant and likely won’t run on an android 12 device. Note that if you don’t have , , or sections anywhere in your AndroidManifest.xml, android:exported=“true” will not be used.
@glizzy5154
@glizzy5154 2 жыл бұрын
@@slothgameguy so do we have to start over again at the SDK part and have a it 11 or before then? how do I make it so that Android 12 works with my project
@slothgameguy
@slothgameguy 2 жыл бұрын
@@glizzy5154 you’ll probably have to google that part because I don’t have a good answer for you. I’ve always had it work correctly by installing the SDK prior to importing the project and then I go through the video steps. I don’t think you want to import project without having android studio up to date with the correct SDKs installed, so do that first before attempting the project import and build.
@glizzy5154
@glizzy5154 2 жыл бұрын
@@slothgameguy what happens when I continue to build the apk when the export isn't there?
@slothgameguy
@slothgameguy 2 жыл бұрын
@@glizzy5154 If you open AndroidManifest.xml in your project, and android:exported=“true” lines aren’t there for the the , , and sections, and you choose to build the app bundle anyways, that app bundle will not be supported on Android 12 devices. So when someone downloads your game from the play store and tries to run the app on an Android 12 device, it’ll just crash.
@ahmedelbehiry1638
@ahmedelbehiry1638 2 жыл бұрын
thank you,this is very useful
@Renagade01
@Renagade01 7 ай бұрын
Do you have a video on how to call different scenes for like example i have this multipple buttons and each buttons is dedicated to start a scene from the apk? how to do that ?
@challengedollar2880
@challengedollar2880 7 ай бұрын
hey sloth guy, thanks for this, however when i export from unity and import , it doesnt give me the option to use android studio sdk or project sdk, how do i get that?
@cliff7282
@cliff7282 Жыл бұрын
How can I add Activities and navigate with intents between them?, This isn't a normal android project and some libraries missed. And if this is possible, how can I update my unity project not doing again all the work for the new screens?
@patrickjansenD
@patrickjansenD 2 жыл бұрын
How about the symbols and mapping files which Unity normally generates? Does that require extra steps in AS?
@slothgameguy
@slothgameguy Жыл бұрын
I’m not sure, to be honest. That’s more in depth that I personally went.
@cristianjuarez1086
@cristianjuarez1086 Жыл бұрын
@@slothgameguy Hey, you have no idea how much this video helped me, Unity wouldnt compile and this finally allowed me to get an .aab, however, for some reason when i try to upload it to the play console it gives me a "Invalid uncompressed glob" error, no idea what it is, do you have a clue?. Thankyou anyways
@slothgameguy
@slothgameguy Жыл бұрын
@@cristianjuarez1086 Does this help? stackoverflow.com/questions/76762673/error-invalid-uncompressed-glob-while-uploading-app-release-aab Never had this issue myself though
@cristianjuarez1086
@cristianjuarez1086 Жыл бұрын
@@slothgameguy Hello again, Yes it did! i found that very same post a few days ago and it did the thing, i was able to compile a valid bundle for the playstore, thankyou!
@igsdeveloper944
@igsdeveloper944 Жыл бұрын
but i have a error on android studio error is "Export feaild" help me 😥
@slothgameguy
@slothgameguy Жыл бұрын
I’m not an expert, I’ve just found this method works. My only suggestion is to make sure you follow the video tutorial exactly. I’m not experienced enough to troubleshoot errors though, sorry.
@amirmirzababapour6016
@amirmirzababapour6016 2 жыл бұрын
Thanks, must be a great help!
@yehiawaleed
@yehiawaleed Жыл бұрын
I keep on getting this error in android studio: This version of the Android Support plugin for IntelliJ IDEA (or Android Studio) cannot open this project, please retry with version 2021.1.1 or newer. what should i do
@slothgameguy
@slothgameguy Жыл бұрын
I’m sorry, I have no idea. Never seen this error before. You could try backing up your project first, then upgrading your Unity to one of the newer versions. Please backup your project first before attempting any Unity version upgrades!
@umairshahbaz458
@umairshahbaz458 2 жыл бұрын
My unity game not build using Android studio unity game version 2017
@space_orphan
@space_orphan 2 жыл бұрын
I noticed in the unity project settings you have ticked "Custom Main Manifest". I haven't set up a custom manifest, and I noticed my manifest looks very different from yours. I don't have an "Activity" line, for example. Is this an issue?
@slothgameguy
@slothgameguy 2 жыл бұрын
Should be I don’t think. I tried to setup a custom manifest when I first encountered this issue. What ultimately gets populated in your exported manifest is also based on a lot of game options. Just use what Unity generates on export and follow the video and I think you should be ok.
@dota2adsc653
@dota2adsc653 2 жыл бұрын
Hi, i have a question: I have a android studio project and i wanna import to this project one unity exported project, and I wanna use that in my android studio project. Can I?
@slothgameguy
@slothgameguy 2 жыл бұрын
Sorry, I’m not familiar enough with Android Studio to know if that’s possible.
@nikhilkadam2717
@nikhilkadam2717 2 жыл бұрын
Hello, I am trying to integrate a project from a unit as a library into a native android project. The unity project uses video files. When exporting, everything is exported and works fine except for video files. For some reason they are not exported along with the rest and therefore are not displayed in the scene. Any solution for that??
@slothgameguy
@slothgameguy 2 жыл бұрын
I’m not 100% sure, but maybe try using a different video file? It’s possible the android environment doesn’t support some file types. What is the file type now?
@nikhilkadam2717
@nikhilkadam2717 2 жыл бұрын
@@slothgameguy I am using .MP4 file...
@SpaceValveGuy
@SpaceValveGuy 2 жыл бұрын
@@nikhilkadam2717 try converting video to H.263 instead and see if it works.
@nikhilkadam2717
@nikhilkadam2717 2 жыл бұрын
@@SpaceValveGuy OK Thank you for replying so fast....
@tester424
@tester424 Жыл бұрын
Heheeyy bro, i have the same problem, did you ever found the solution? Ill try the H.263 now otherwise ill make a script getting video from url :(
@BageStudios
@BageStudios Жыл бұрын
Will this have a positive impact on the apps performance as well?
@slothgameguy
@slothgameguy Жыл бұрын
I don’t think it would, no.
@phyohtet6480
@phyohtet6480 2 жыл бұрын
does it work for unity 2019.4.3 lts project ? because I can only find export project and not export app bundle check box in 2019.4.3 build setting
@phyohtet6480
@phyohtet6480 2 жыл бұрын
Please help me
@slothgameguy
@slothgameguy 2 жыл бұрын
I have no clue if it works on 2019 version. If I were you, I’d backup your project and then try to upgrade it to use a newer version of Unity (such as 2021.3.10f1). As far as I can tell, the “export app bundle” check box is necessary and google play store needs the .aab file (android app bundle) of your game from android studio to work. Hope that helps.
@ArcaDone
@ArcaDone Жыл бұрын
Magic!!! Thanks
@solairenero5023
@solairenero5023 2 жыл бұрын
ty god
@67Diadem
@67Diadem 2 жыл бұрын
I got this error IL2CPP build fail Can you please help me how to solve this.
@slothgameguy
@slothgameguy 2 жыл бұрын
What is exact error quoted? IL2CPP is the scripting backend. If you go to Unity > Edit > Project Settings > Player > Android tab > Other Settings > Configuration > Scripting Backend: is IL2CPP selected here?
@67Diadem
@67Diadem 2 жыл бұрын
@@slothgameguy yes IL2CPP is selected. When I converted to library and use as a library in android studio with existing app then IL2CPP error showed. I have installed ndk and also linked ndk.dir with configured with gradle script
@67Diadem
@67Diadem 2 жыл бұрын
I got this error:- Unity.IL2CPP.Building.BuilderFailedException: C:\Users\91700\AppData\Local\Android\Sdk dk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\91700\AppData\Local\Temp\tmpFE23.tmp" -o "D:\Unity_Ar\UnityProject\unityLibrary\build\il2cpp_arm64-v8a_Release\il2cpp_cache\linkresult_5B6E03084BB4E7EE3955C1335D1B26D9\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id -stdlib=libc++ -static-libstdc++ -target aarch64-linux-android21 -Wl,--wrap,sigaction "D:\Unity_Ar\UnityProject\unityLibrary\src\main\jniStaticLibs\arm64-v8a\baselib.a" -llog -rdynamic -fuse-ld=bfd.exe
@slothgameguy
@slothgameguy 2 жыл бұрын
@@67Diadem hmmm, I’m not sure what that error could be from. I’ve never encountered that. Does your project build via Unity? I don’t ever upload Unity built builds to Google Play, but building via Unity can show if it’s a Unity side or Android Studio problem.
@remijoel1448
@remijoel1448 2 жыл бұрын
Do u need to install tne NDK in the SDK tools section?
@slothgameguy
@slothgameguy 2 жыл бұрын
Yes. You need to install these in Android Studio.
@remijoel1448
@remijoel1448 2 жыл бұрын
@@slothgameguy alright.. Thanks
@nikhilkadam2717
@nikhilkadam2717 2 жыл бұрын
Hello, Which version of Android Studio do u use in this tutorial
@slothgameguy
@slothgameguy 2 жыл бұрын
Android Studio Arctic Fox 2020.3.1 Patch 1
@nikhilkadam2717
@nikhilkadam2717 2 жыл бұрын
@@slothgameguy Thank you...
@gawartgamesvzla
@gawartgamesvzla Жыл бұрын
Thanks!!
@nmbileg
@nmbileg 2 жыл бұрын
building unity project for iOS devices is super convenient and easy but android is always a pain in the a** (
@populargamesonline
@populargamesonline 2 жыл бұрын
Great tutorial, i have some questions, never used Android studio, i love to use unity 2019.4.6 version for my games but unfortunately it does not support to build for android 12, every time i try i got errors. Tried everything but it needs new build tools and everything that is not supported. Can i export project with 2019.4.6. and try to build with android studio like in your video? Hope it will update all required files, because i realy have many projects and im afraid that if i update my Unity it will mess up my projects. If Android studio can do that then i will use this method and my projects will be safe.
@slothgameguy
@slothgameguy 2 жыл бұрын
It should work. I only started using android studio because of this issue, I think this tutorial should cover everything you need to get it working. Android studio looks hard, but it’s easier than you think and you’re using very little of its full functionality.
@populargamesonline
@populargamesonline 2 жыл бұрын
@@slothgameguy Tnx i realy need to start this, hope android studio will solve compatibility problems that i have with unity and all thos error mesages. So i just using unity to export project, and 2nd part i do with Android studio. Hope there is no need to update Ads like Unity and Admob SDK that already working fine.
@ArikCool
@ArikCool Жыл бұрын
Jesus, you saved Me!!!!!! Thank You so much!!!!
Quickly preview your game on Android device | Unity tutorial
6:29
Unity Android Integration: The Complete Guide
7:30
The Creator Pixel
Рет қаралды 4,1 М.
What type of pedestrian are you?😄 #tiktok #elsarca
00:28
Elsa Arca
Рет қаралды 44 МЛН
Мама у нас строгая
00:20
VAVAN
Рет қаралды 12 МЛН
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 119 МЛН
I Optimised My Game Engine Up To 12000 FPS
11:58
Vercidium
Рет қаралды 726 М.
Learning C# In A Week... Otherwise I Fail University
9:04
Build Your Unity VR Game for Oculus!
25:06
Justin P Barnett
Рет қаралды 131 М.
Why you should use code to animate your UI in Unity.
5:02
Game Dev Guide
Рет қаралды 335 М.
Publishing a Unity Game to Google Play Market in 2021
23:56
MrM Programming
Рет қаралды 74 М.
Zed “kills” VSCode
12:10
Alex Ziskind
Рет қаралды 896 М.
What type of pedestrian are you?😄 #tiktok #elsarca
00:28
Elsa Arca
Рет қаралды 44 МЛН