Solved: 2018.1.0f2 crashes when building for Android

Hello,

I’m using Ubuntu 18.04 and the latest beta of Unity.
When I’m trying to export my project to Android, Unity simply crashes.
It even crashes when trying to export a new project, so I don’t think that my scripts are the problem.

Gtk-Message: 12:37:19.938: Failed to load module "canberra-gtk-module"
Abgebrochen (Speicherabzug geschrieben)
david@david-XPS-13-9360:~/Unity-2018.1.0f2/Editor$ ```

I've installed the Android SDK via Android Studio, and I've installed OpenJDK 8 and entered both paths into the Unity settings.
My phone is connected to my computer, and USB debugging is activated.

Am I missing something, or am I doing the export wrong?

Thanks in advance for the help.

Cheers
David

![](https://i.imgur.com/5lytkpe.png) 
![](https://i.imgur.com/T0UNF7b.png)

Ok, I’ve now found a solution to this problem while searching for something else. (^_^)‘’

The SDK wasn’t able to connect to my phone, because the udev rules weren’t correct.
So I had to install android-tools-adb via apt to set the correct rules.

Also I had to change my systems Java to OpenJDK 8 via sudo update-alternatives --config java because the SDK doesn’t work with OpenJDK 11.

And last but not least, I had to switch my project to Android and set the package name, and change the build system from Gradle to internal.

Now my project builds with no problem.

I hope this information might also help other people, that have problems with building their project for Android.

Cheers,
David

2 Likes