 Hello guys crypto grounds here welcome back to another unity C sharp out of game tutorial video this episode 42 and today We're gonna be building for Android if you enjoyed this video make sure you smash a like button subscribe to my channel If you're new and turn on those notifications to get notified for future videos If you want to comment all your feedback questions suggestions compliments all that good stuff Let the leave them down there below. I'll be sure to check them out and let's hop into it So also, I just wanted to say that I'm sorry that I've been very inactive on you too lately um Releasing a game in five days is quite stressful And I've been kind of just not wanting to do YouTube for until then, you know, if that makes sense But this video needs to be done. So I decided to do it today since I have the time and yeah So make sure you guys tune in for the release. It'll be on steam cartridge itch.io iOS and Android. Alright, so anyways We have our game all set up. So if you haven't done episode 14.5, which is where we fix AdMob Make sure you do that. So your Google ad or Google mobile ads plugins look like this. Okay, so Make sure you do that Okay, so now what we're gonna do here is we go to the build settings, which is file build settings And we're gonna select to play or Android Make sure you have all the stuff installed. So if we go to Project settings. No, not project settings. We will need that though Preferences if you go to preferences external tools, make sure you have the all of this installed. Okay, JDK SDK and DK and grattle Okay, so all that stuff make sure it's all installed. Okay, and so let's go to player settings Which opens up this and I've already set some of this up I've already got myself an icon and a version company name and a product name Okay, so make sure you set these up make sure you increment your version every time you update your game And I'm gonna start with the bundle version code one. Okay, so Let's see here Let's check all the settings icon I don't touch the icon settings because we have a default icon here So we could just ignore that Resolution and presentation I think this is fine since our game is in portrait mode, so we're just gonna leave it as portrait Okay. Now if we do auto rotation, it will automatically do landscape right and left, which is an issue because it will Do really weird things like this Or that's a bad example It looks like this, right? So right now our currently our game is optimized for This resolution so you might want to adjust that you might want to adjust the anchors and stuff like that Now if you have an issue with that, don't ask me in the comments below because I'm not I can't help every single person Just make sure you experiment with the anchors here as I've explained And I'm gonna do a separate video on anchors because I feel like that people still get stuck on those So I'd rather suggest those kind of videos Splash screen I don't adjust but here we can just preview real quick. Let me reduce the size of this So, yeah, it looks like that Okay, so other settings now we have our package name here Please choose a different package name or else you will not be able to publish your game So mine is the company name and the game the company name and the game name. And so it's this format right here Com dots this must be here. Okay. It must be this exact format. So yeah, make sure whenever you update your game You increase this bundle version code and if you forget If you've incremented or not, you can always go check in Google play, but the safe bet is just increase it anyways, okay Should be less than 100,000. Oops crypto clickers accidentally said to a really high number So make sure you don't do that make you start at one. Okay Scripting backend IL to CPP Dotnet 4.x release and these should be all the settings here No internet access you will pull you will need internet access in order to get daily events because it's Using a web and a UTC API in order to grab the time so people can't cheat So make sure you have the internet access as auto now if you do require you can't launch the game if you don't have Wi-Fi So just a heads up. So make sure you set it to auto Right permission internal. I just leave all these settings as it is and you can honestly turn this These errors off the stack trace But it'll be nice for the first few updates or something like that to have a script only So then Google can report crashes or errors to you. So that'll be nice Like I've had Google play like Google AdMob errors in the past and yeah, that's nice So I can figure out why my game is loading properly Okay, so now we're in our publishing setting. So this is probably the most crucial step So you're not gonna see this path here, right? I've already created a key a key store, but I want to create one with you guys So we're gonna go to key store manager, which we should open up this and we're gonna create a new We're gonna create a new key store in a certain location, which I'm gonna I have a folder created in my Project here. It's called key stores. Okay, so I'm just gonna call this user new I guess just you can call it user Okay, so now I'm gonna type in a password here Actually, let's do that last. Okay, so Now you just type in an alias which you'll find here. Okay, so I'm just gonna type this in as Release key or something like that something that you can remember you type in a password for all four of these Okay, I usually choose the matching passwords, but it's whatever you want Just make sure you remember them or else if you forget you will not be able to publish this game on the store anymore Okay, these this is very important. Okay, so make sure you have a very safe password But also one that you can remember because if you forget it and you you can't build you basically just cannot build this project Anymore and if you create a new key, you cannot upload it to your you cannot update your game on Google Play I never changed this you can set you whatever information you have. Okay I'm just I'm not gonna I'm just gonna fill out this information real quick and what you when you're done press add key in here, okay? Okay, so once you create that Key key release key created in user new key store. Yes, so we want to set them as our project key store So automatically do that for us and it types in the password for us, which is nice So normally you would just have to you might have to Select your key store if it doesn't work. So you just click select and go to where you created it and select your Select it. Okay, and You select release key as the alias and type in your password. Okay, and that should be it Okay, so now we go to our built settings again and click build So I have a built folder with all my builds. I'm not clean this after I release my game But I'm just gonna create one called a v 1.0 Android and I typed that earlier because I did I did a trial and error So they should work. Oh Failed to update the SDK package list. Okay, so I guess that's what was going on here Getting API levels. I don't know what's going usually in this case. You'd have to restart your Unity, so let's let's check out the error Yeah, you see I get these dumb errors location of your Java installation. Okay So if you get something like this again most errors, I will not be able to help you out with that's a that's a Google thing You're gonna have to do is Click this since we're in a new version. Oh, we're not even in a new version of Unity. Okay, so click this click browse Yeah, just select a folder. I guess Cancel and just re-select this just you have to just mess around with these settings Okay, and in some cases you're gonna have to go to assets Google No Where is it? Yeah external dependency manager and go to Android resolver and resolve Okay Resolution succeed you might have to do force resolution or force resolve to so I'm gonna do that real quick Which should take some time. Oh, it took some I failed Okay So in this case, I guess we just have to I think I might have to update my Unity version because I have two different versions So I'm like I'm gonna have to do that real quick. Oh We're starting a computer. Okay So what I'm gonna do here, I'm gonna change the version of my Unity be right back also, honestly, if you aren't using Unity to 2020 or at least the latest version of 2019 if you're using 2018 get out of that like just get out of that right now Because it'll cause you a lot of issues and you have to do lots of setup that you don't have to do I remember having to do it and it was not fun There was a bunch of bugs having to Redownload the correct SDK Android SDK tools and stuff like that. It was just not a fun process And now they automate it for you, which is nice. So you have to deal with that Anymore, which is good. So make sure I'm using 2020 point one. I think Whatever the latest releases may open up this thing Yeah, 20 20 point one point zero F1 Excuse me So, yeah, see they see these are long-term supports. So I'd either recommend so don't use the 2018 right even though It's got long-term support. I would either suggest this one to 2019 point five point five or 2020 point one. Okay One of those will be perfect So I'm using 2020 and previously I was using 2019 point three point zero. I used it for the longest time I should actually start upgrading all my versions honestly But yeah, make sure you are up-to-date with your versions because there could be a lot of helpful bug fixes And if there are failures, then you can always just downgrade. Okay, so it looks like it loaded now So for your API levels make sure you choose I don't know. I just used the lowest API level possible because there are people who still uses use these really low levels, but most people use Anything from marshmallow to pie Maybe lollipop, but I don't know who would and then for targets. I just do it automatic. Okay, because you'd have to I Think I have Oreo installed. I don't think I have and I don't think I have pie, but Yeah, just do the automatic highest installed which unity does that? Automatically and if you want to use an even higher level, then I think you have to install something And it will give you like a pop-up, but I don't want to go through that process I don't know what would happen exactly, but okay, so let's try building again and it should work Do the passwords again Yeah, every time you load you got a type in the password. So I guess I can just demonstrate this process and What you do here is build Failed to update Android SDK package list see console for details. Okay, so we're going to do some research here I'll do that. Okay, so looks like we have some issue here So we have a Java home right here. So I'm looking at this forum post right here I know this has been a major issue for me in the past I didn't I had to add this manually and still cause bugs, but you see how this is still version 2019 So what I think I'm gonna do I'm just gonna completely like I'm gonna copy and paste this maybe even replace the URL here But it's saying that we should delete this now I don't want to delete it because I feel like this will cause some future issues here. So let's try it one more time Build Okay, so let's delete this environments table or a variable so you can just search environment variables click on that Go to system variables and just delete Java home Okay With this might require a restart. Okay, so what I'm doing right now It looks like it's resolving Properly, which is good So what I did is I went back to the preferences external tools and I turned off every single one of like the JDK SDK and DK So here, I'll show you I basically unchecked all four of these right here not to stop grattle right here And then I just turned the Mac on right after so I went just down here and then back up Okay, and then started a resolving so and also set my target API level to pie. So maybe that was also part of the issue Okay, cool. So it looks like it's starting to actually build now. So fingers go there. Mind we have errors. Oh I thought we were good. Oh We have come we've what? No, we don't It says we have errors in the editor even though we don't Okay, so it says we have compile errors. Oh, it's this right here. Great. I don't know what this is I've never had that error before so again just research. Oh right here Okay, so now so it says to just uncheck this which is above the input manager right here So just turn that off. It's below allow unsafe code and we should be able to tell now. Oh We have compile errors Okay, so I'm guessing up to refresh this. I don't know. I don't want to do that Okay, so now let's try building one last time and this should be the last time we will have issues And now I'm just gonna kick back. I'll see you guys when it's done Okay, perfect. It completed. Wow. I'm actually surprised. I was able to get through the day. I Was thinking I was gonna have tons of issues and actually not gonna lie I've had tons of issues in the past. Come on. Come on CPU speed up Okay, so I have built v 1.0 Android and I have loaded up blue stacks So this is a good way to test Android now. It's kind of slow But if you have an Android device, you can just simply email this to yourself and download it on your Android device, but I don't so hot. Let's just drag that APK into blue stacks. So if you build it Where is it a Build app bundle, which is like an AAB or ABB. I think a AB. Yeah, you can't drag those in here, right? Okay, cool. So we have our idle game tutorial with my earth icon that I have implemented I think it looks really nice. I actually like that But anyways, let's open that up and it should boot right into the game Yes, it loaded first try Awesome, and I think it'll automatically boots. Nope. It's not the right resolution But as you could see we can play our game and we could check for daily rewards. It looks like we haven't gotten it yet Okay. So, yeah There are bugs obviously in the game like by max isn't working properly, but I will Fix those in the future. I'll probably do another bug fixing video Just stuff like that once I gather more bug fixes and also I'll be providing If you have a bug with a certain video check the comments and I'll because I'll be leaving stuff there, too And if people just still keep missing the videos and I'll just keep I'll keep Providing more information. Okay, so let's see. Can we watch an ad yet? No, we can't okay, so Now I'm gonna hop into Okay, so this is where you go you if you haven't registered for a Google Play console if you want to release your game make sure you do that and you can just go to dashboard or all apps right here and You can create a new app Somewhere in here This is not all apps, but yeah, so you just create a new app in here get all the Yeah, right here create app You get all the store information to description and all that and then you I would highly suggest you to do closed testing or internal internal testing is instant, right, but you need to email Invite yourself and you can have up to a hundred people to test your game, which is really nice But yeah, there's lots of videos on there I'm not gonna really touch on Google Play console because that's not my job and Yeah, so anyways, here's our first Android build. I hope you guys learned something new And I hope you guys got it working if you didn't and if you enjoyed this video Make sure you smash the like button subscribe to my channel if you're new and turn on those notifications to get notified for future videos and Livestreams and also just know my game is coming out very soon five days. Hopefully if it's not played Crypto clickers right here You can pre-order it on iOS and set it or add it to your wishlist on Steam So you make sure you do that and it will be out on Google Play soon anyways, so you guys did it Thank you for watching peace