To start with, I use Unity Pro 3.4.2 with Android Pro on OS X. I’m able to build my project for Android and deploy on the device, it works like a charm. I have also been able to create a java library that I want to use as a Unity plugin, create a java project in Eclipse that uses my library and the Unity project as a library. It works great and my calls from Unity to Java code does what’s expected.
The process of using the Unity project as a Java library with Eclipse involves a lot of hands-on steps with copying this and that, and is quite error prone, so I really want to just add my java library as a plugin to have a more streamlined process. Here comes the problem:
As soon as I add any java-code to Assets/Plugins/Android the build fails with an ArgumentException and the console saying “An empty file name is not valid”. Details:
Exception: Error building Player: ArgumentException: An empty file name is not valid.
UnityEditor.BuildPlayerWindow.BuildPlayerWithDefaultSettings (Boolean askForBuildLocation, BuildOptions forceOptions)
UnityEditor.BuildPlayerWindow.GUIBuildButtons (Boolean enableBuildButton, Boolean enableBuildAndRunButton, Boolean canInstallInBuildFolder)
UnityEditor.BuildPlayerWindow.ShowBuildTargetSettings ()
UnityEditor.BuildPlayerWindow.OnGUI ()
System.Reflection.MonoMethod.Invoke(System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object parameters, System.Globalization.CultureInfo culture)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
Anyone recognizes this and/or have an idea of what’s causing the build to fail?
As a side note, I have problems with configuring the Keystore in Unity, I don’t know if it’s related but I seem to be able to build and deploy a “clean” project anyway…
Thanks!
FYI, I’m a complete rookie with Android development, and hence, with Unity Android development as well…