How to fix build error with UnityAds after upgrading to Unity 5

Is your Unity project using UnityAds? Did you just update to Unity 5? Are you now seeing an error when trying to build for Android? The read on…

Unity 5 now includes in-built support for UnityAds, without requiring the UnityAds plugin from the Asset Store. As such, if you’ve previously imported the plugin, Unity might complain. It may simply be fixable by choosing Assets > Reimport All (which might make Unity realise it should ‘ignore imported version’ of UnityAds).

But, if that doesn’t work, you’ll probably see something like the following console output when trying to build an Android APK:

If you’re seeing this, it simply means you’re project is still trying to include both the in-built and imported versions of the UnityAds plugin. To fix it, follow these steps:


 
  • Close Unity Editor
  • Backup your project
  • Remove any folder or meta file called UnityAds from your project’s Assets/Libs folder
  • Remove any folder or meta file called UnityAds from your project’s Assets/Plugins/Android folder
  • Start Unity
  • Build your project for Android

If this doesn’t work, try doing an Assets > Reimport All, then building again. Hopefully, future version of Unity will solve this problem automatically. Good luck out there!

InterServer Web Hosting and VPS
 

Leave a Reply