Unity can't build game for android - unity3d

I wanted to try if I can build a game for android. I created a new project and switch to Android platform.
Installed all ndk,sdk.(automatically and manually. I tried both). But I can't build. When click create, nothings happen.
Screenshoot

Did you give the apk a name?
Nothing happens, what do you mean, the window closes and nothing further?
And yes, if you use a device, then you have to give Build and Run

Related

How do I manually update pubspec.yaml?

I am trying to get dependencies for my pubspec yaml file after I made changes. However, first, I can't even see my IOS Emulator anymore (it seems to have disappeared). I am using MacOS.
Could you please tell me how to update pubspec yaml manually on Android Studio, normally there is a ribbon which shows, but after I made changes, no ribbon has showed up. Also, if you know how to make my IOS emulator (Xcode simulator) show up again, that would be much appreciated. Thanks.
Go to menu bar > Xcode > Open Developer Tool > Simulator

Emulator not running the application

I am trying to setup flutter on my device, so far I have been able to download the flutter SDK and android studio and satisfy the conditions of flutter doctor to start learning android application development:-
flutter doctor
I ignored the absence of visual studio as I don't want my app to be compatible with windows(as I am trying to develop for Android) but I am not able to fix the missing java bundle, any help on how would I do that?
I just ignored it for a second and moved on to set up my emulator but on running, it shows a pop up which says "Attach a debugger or ESC to cancel"(the pop-up is something like this.) how would I fix it.
This doesn't run the app on the emulator so how would I fix that?
Also on trying to debug, it throws this error, I am totally confused on how to proceed further to at least run my app so that I could start developing and learning flutter?
I am following along this to run my application.
Edit:
I have the java bundle in place but don't know how would I configure Android Studio to get it.
java's prescence
Also that the emulator is now showing that the System UI is not responding and on closing it, it further shows this.
It's been a week since I am trying to work out the setup of flutter but some way or the other some issue happens, please help.
Thanks in advance.
you have to install java runtime environment and It'll work. get from here
it'll show like this if you have JDK installed properly.

Freeze on Copying APK file

I created a new empty project, switched platform to Android and started Build and Run. But when it comes to "Copying APK File to device" it just freezes and I have to restart Unity.
I installed Android SDK & NDK tools just before that (through Unity Hub). Android Build Support was installed by me manually a while ago so it was visible as installed in Add Modules window. I did not do any changes to the project. The most interesting thing is that the apk is built in my Builds folder. Not sure if it works though.
I am using Unity 2019.1.0f2. The device Android version is 9.0 (API level 28) and the minimum API set in Player is 16, so the problem should not be with API.
Does anyone know possible reasons for it?
Try to turn off the following setting on your android device.
Settings -> Developer options -> Monitor apps installed by ADB
This setting(if turned on) will ask a verrification if you want to install the app. It feels like this cuts off the connection with unity which causes it to get stuck.
Unplugging and replugging the device seems to work aswell. In case of big projects this is anoying tho since if you are to quick it will just say it lost connection and it will ask if you want to reconnect, which in turn causes the same problem.
This is the only answer that worked for me:
https://answers.unity.com/questions/1248123/build-run-apk-freezes-on-pushing-content-only-one.html
In short, Player settings -> Publishing settings -> Split application binary
First of I would ask you on what computer did you run this on? (performance wise)
Second you can just copy the .apk file to the phone and install it there. If you got to where it prompts for copying to android your apk file is fine and built.

Eclipse using Android emulator

I wonder if anyone has faced the same problem.
When we done some modification on the code, as the emulator is running; is there any way we could see the instant change without closing the emulator?
Sometimes when I made changes on the code then run the emulator, the amendment that I made doesn't seem to show on the emulator even after I clean the project.
Does anyone have any idea how to solve this?
Thanks.
Eclipse has an option under 'Run' in the menu bar to build, and run. This will re-package the application and send it to either your AVD, or attached android phone.

How do I clean up my android emulator of unwanted applications?

I still have unwanted apps in my menu in the android emulator. The projects which have been deleted from the workspace are there on the emulator. How do I clean the emulator?
The easiest way is just to launch the emulator, go to settings -> applications. Then pick the unwanted applications and uninstall them.
Alternatively you can do adb -e shell while the emulator is running, find the .apk files in the file system (I think they're under /system/apps) and remove them manually.
One final solution is in Eclipse's Android Plugin (ADT), go to the file manager, find the .apk files and remove them.
If you want to delete/uninstall unwanted apps from the android emulator just follow these steps:
Click and hold the app you want to delete/uninstall from the emulator.
You will be presented home screen with "Uninstall option on the top.
Drag and drop your app on Uninstall that's it the app is uninstalled from the emulator.
I prefer delete emulator and create newest.
It takes only one minute.
Easiest way is to Wipe Data:
In may case Wipe Data cleaned around 7GB while I had only one installed app!
It is very simple and quick, just follow these two steps,
Go to AVD Manager,
Then simply, wipe the data of emulator.
It will be like brand new device.