How to Export From Godot to Android

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys this is mitch with bindpoint cgi and today we are going to talk about how to export your godot game into android so we're going to talk about how to install java we're going to talk about how to install android studio and how to generate your keys and how to generally export your game into an android format that you can then install on an android phone or you could go ahead and put it out on the google store so that's what i have in store for you guys so let's go ahead and uh get started okay so the first thing that you're going to want to do is you're going to want to install android studio so i'm sitting here at the android studio website which is if i actually pull this down a tiny bit there we are which is developer.android.com studio so what you first need to do is you need to go ahead and click download android studio now you're gonna have this giant license and agreement and be sure to read through it uh but basically the gist of it is hey you know they are not liable for anything that um this application may or may not do to your computer and you are they are not liable for any security risks um and you don't own any of the android sdk or anything like that and that's all fine so let's go ahead and say i agree and download it for windows now while you're doing that you also really should download the adopt open jdk which is located here at adopt openjdk.net index html so if you go to this website it'll just take you directly there so you're good to go and go ahead and pull down version 8 and with the hot spot now the difference between hotspot open j9 is basically just do you want the ability to have a better machine performance or do you want the ability to have multi multiple machines perform better honestly it doesn't really matter for what we're going to use it for just go ahead and download whichever one you think is best so in this case i'm doing hotspot so we'll go ahead and download that and i will see you guys once these are done downloading okay so now that it is uh downloaded and ready to go i'm gonna go ahead and open up my android demo folder here which has both of them downloaded and what we're going to do is we're going to first install openjdk so we'll double click that and you'll see the windows installation and we'll go ahead and run through these just accept all the defaults and i will be back with you guys once this is done installing all right now we're gonna go ahead and finish and then we're gonna open up android studio and this one's a little bit more involved so you know we'll be paying attention pretty close to this one so you'll see it'll load and then it will create a temp file here it'll prompt you so go ahead and say yes next next uh next android studio that's fine so it's going to go ahead and install it and again i'll be back with you guys in a second okay so now we're going to do is we're going to hit up complete we're going to start android studio so make sure that that checkbox is checked it should be checked by default but just in case and then it's going to come up for you it's going to say to import anything don't import any settings we don't have anything for that that we need to import so we're going to go ahead and open this up and i don't like to send my data to google so that's fine and it is going to ask us to update go ahead and close that click next here do a standard installation next use dracula because if you don't use the dark mode then you obviously are heathen hit next and then you'll see uh all of these android emulators and things like that they'd like to install so go ahead and hit finish and it's gonna go ahead and download these things now the reason why we need to install the android studio is so it can compile your entire project now you don't necessarily have to install android studio to do a um to export out to android there are ways to do that and i will go through that in the video next week i'll be going through how to do an actual compile of an android apk yourself without using android studio but this is the easiest way to go about doing it right off hand so once this is done with this downloads and installations i will get back with you guys so as a check-in yes it's gonna take a really long time um i've been here for about 15 minutes waiting and it's still not done so make sure you go get a cup of coffee and you know just kind of chill out and wait for a bit i'll see you guys in a bit thanks okay so now that we're here we need to go ahead and generate our key store so what is a key store well basically what it is is it's a keystore file that signs and says that your apk is an actual signed by google or signed by a developer at least apk so it can be installed on the machine we need to do first so we need to open up a command prompt so make sure you do a cm open up a cmd cause i'll just paste it in and like i said i'll throw it into your guys's thing for you if i hit enter you'll see that it doesn't say anything which is always good and if i go out to my current directory so to my users directory if i go to c users that uh debug key store let's see right there which is perfect so now that we have that we need to make sure we have adb installed so adb it's not recognized but i believe we have it we should be okay there because it gets installed with uh android studio that's one of the biggest reasons why we need it so let's see now let's go ahead and set up our godot so let's go ahead and open up kudo and you see there's a command prompt that popped up but what we're gonna do is we'll make a new project we will call this um it's like naming a kid it's always hard to name um android xport uh demo demo project all right and we're going to go ahead and browse out to my github folder because i'm going to be using my github folder for this i'll go ahead and create that folder and create the project so you'll see godot takes up my whole screen so let me minimize this i have an ultra wide and recording on an ultrawide is not great so now what we'll do [Music] what we'll do is we will go to project or editor editor settings and then we're going to go ahead and go down here to export android and you'll see that it has all these different options here so there's a bunch of options here and things like that that you really need to pay attention to so the first one is adb which is the adb executable location so let's go ahead and click this and we need to go find it so what i like to do is i like to open up a path and then i like to go to my app data location which is where it is it's right here in the app data if you can't see this what you need to do is you need to go to view show hidden files and make sure that's hit as a checkbox here if it is then you should be able to see this so then double click that go to i believe it is local and then android sdk and platform tools and there should be adb.exe right here so if i just copy that whole path and i paste it into here like that it'll take me here and then i double click on my adb now for my jar signer i actually need to find my executable from my uh from my uh open adopt open jdk so we'll go to c program files [Music] adopt open jdk which is actually in must be in 64 but it's in 64 bit so c program files adopt open jdk adopt open jdk hotspot and then bin and then there should be a jar signer in here somewhere so let's take a look should be called jar signer right there so we'll double click whoops we'll i'm sorry we'll copy let's not double click it and paste it in here and then we're going to find it in here so java jar signer right there so we'll go ahead and click that debug keystore wherever we generated it which in my case was my user directory it is right here so we will go ahead and open that up as well [Music] so now we have all of the things that we need to export to android so we should be good to go to go ahead and hit close let's create a 2d scene and let's just put i don't know well actually let's not create 2dc let's create a ui user interface scene let's right click add a child node and let's go ahead and add in a button so let's type up here button and we're gonna go ahead and drag this out and let's just throw it in the center of the screen ish somewhere in this general area and one of the things that i always suggest if you're doing an android project go into your project settings so up here project project settings and change your resolution which is under the which is under the window section right here so then i want you to change your width and height to whatever android device would be considered so one of the things that you should always check out is whatever an android resolution is so what i do is i usually just google one of the google phones so like pixel 3 so if i bring out this little google here you'll see pixel 3 screen resolution and it'll tell me what the resolution is so we can see it is 2960x1440 so we'll grab let's see google pixel 3. we'll grab this that and it's going to be our 2 2 8 0 so 2 2 8 0 and 1080. all right so then when i close this you'll see the resolution has changed and it looks like i flipped the numbers by accident so let me change that ctrl c c 10 1080 and paste that there we go so now you can see this is what it's going to look like on my google pixel so we'll go ahead and put this in somewhere in the center and we'll just say test button we need to make sure that we save so go up here to scene and save our scene as android test scene [Music] and then we're going to go up here to project project settings well actually it'd probably just be easier for me to do it this way hit play select select my test scene and you'll see that there's my test button which is great so we'll go ahead and remove that and now from here we can go ahead and go to our project export add our preset android and then we will go down here and we will name it test android app and we are going to let's see let's let's talk about some of these options so we have xr so for ar or for uh vr um stuff that's what this is for degrees of freedom is the different um degrees of freedom that you allow them to do ar and vr stuff hand tracking focus awareness that's all vr stuff again uh do we have special templates do we have special arguments we want to run what version is our project what's the name of the version of our project we have a unique name this is important okay so if you're making an app your company name should be like this like that and that would be uh my unique name right so you have your organization then your name of your organization and then the project name you want to make sure that you have that screen orientation let's go with portrait or landscape depending on whichever one you want in this case i want portrait immersive mode do you want the buttons to show up support small normal large or extra large phones make sure those are all checked to be on here's where your icons are so if you want a special icon for your project key store if you have a special key store you need apk expansion this is stuff that we'll talk about in a later video when i talk about how to do notifications inside of android but that's just something to keep keep in mind permissions if you have special permissions that you need to call out to that's what all this is for and again you don't need any of this for what we're trying to do at least right off hand now you have resources which is all of the resources so you can say hey i need to export only some of the resources or all the resources or just some of the dependencies things like that uh filters to export or exclude stuff so if you for instance have helper stuff for when you're doing um test stuff that's what that's for filters to exclude files and folders from project that's also very useful you could actually create wild cards to say hey don't pull this entire folder into the project it can really help make your apk smaller patches don't worry about this this is basically if you want to send out a patch for um an android app that already exists features if you have any special feature lists like you don't want to support you know an arm an arm cpu or if you want to support like an intel cpu you can do that with this and script which is compiled text or encrypted and again don't worry about these it's not a big deal for right now at least so let's go ahead and export our project let's choose a location so in this case i'm just going to peel up to my github link and i will export this awesome so now it is exported so we will go ahead and go out to my get location so we'll go here github and then there it is there's my apk now at this point we just have to connect our android phone copy it over and install it okay sorry my computer crashed but what you could do is you can either export this out or like export this out connect your phone and do things like that or you can use your android studio to go ahead and actually run this application so if you go ahead and open up android studio so you'll see android studio popping up here in a second you'll see well in this case i already have it set up so let's go ahead and uh so normally what would come up is would come up with what do you want to do and you can just say i'm going to profile or debug an apk in this case you have to go to in my case i'm gonna have to go to file and profile or debug apk now what you need to do is you need to go out and find your apk so you'll see something like this you'll open this up we'll go to users me we'll scroll down and we'll find documents we'll find github and we'll find android export demo project apk we'll do that and you'll see that this says hey do you wanna do you wanna update existing or create a new one since you guys won't see this um this is just for me so we'll just say create a new one and we'll go ahead and create a new folder so what this is gonna do is it's going to open up a whole new project for me and there we go now what you can do from here this is really useful because it can show you like what's what's all being used how big is the project where's the project stuff is it the resources the res stuff or is it the assets that's causing any issues things like that it's super useful i really suggest that you guys you know learn android studio while you're also doing android uh game development so what you can do now is you can come down here and you should see a pixel 3a this comes by default if it's not there go to your avd manager up here and click on it you'll see something like this and if you don't then just go ahead and create a virtual device and you can go ahead and just choose a virtual device if you're of your choosing in my case i chose a pixel 3a because pixel 3a is basically you know a good budget phone that most people are going to have and if you want to you can actually build your own hardware profiles here which will give you like ram and things like that now what you can do is you hit next and then you can choose to download the different android os's x86 images if you prefer or any other images that you prefer once you download those you just hit finish and you're good to go now in this case i already have this so what i'm going to do is i'm going to go ahead and close this i don't need to worry about it so what you can do is you can just hit this little play button and it will go ahead and load up your android emulator now if you have problems with this you may need to turn on uh hyper uh what is it it's intel hyper virtualization and if that's the case if you do need to turn on intel uh hyper virtualization you will need to reboot into your bios and make those changes now i can't show you how to do that just because it is kind of difficult to to show when you have to reboot your computer and go into bios i can't show you you know very easily but what you can do is you can go ahead and see this you can see the button you can see how we can click on it you know if you hit home you can actually see the app running right here android uh example project i believe it's called or export demo project click on that you can open it up you can rotate your display and see how the game handles being rotated in this case it doesn't rotate but that's basically the gist of it that's how you do it then you can make this bigger or smaller by dragging this so if we go ahead and make this nice and large so we can actually see it you can see our test button right there no problem so that is going to do it for me guys we went over how to install android studio how to install open jdk how to hook it all up to um godot and how to export out an apk and how to load it into the android studio's emulator if you guys have any questions go ahead and hit me in the comments below and if you like my content you know go ahead and hit the like and subscribe and all that stuff and you know if you dislike the content go ahead and hit that dislike button so i get a better idea of what you guys want but again that's gonna do it for me guys thank you so much for watching and i'm gonna see y'all next time thanks [Music] you
Info
Channel: FinePointCGI
Views: 10,325
Rating: undefined out of 5
Keywords: godot, godot android, godot android export, godot tutorial, godot export android, android, how to export from godot to android, godot how to export to android, how to export to android in godot, export godot to android, godot export to android, godot 3.2 android export, export godot project to android, how to export your godot game to android, how to, godot android tutorial, export, how to export to android, godot engine, export to android, godot how to android, godot to android
Id: vbJLbrdvVHk
Channel Id: undefined
Length: 21min 12sec (1272 seconds)
Published: Mon Jan 04 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.