- Home /
Error in building and signing APK.
Just today, I have a serious problem where I cannot build any APK for Android. Whenever I tried to build an unsigned (debug) APK, there always an error message saying:
Error building Player: ArgumentException: An empty file name is not valid.
And whenever I tried to sign the app with a keystore that I generated before, after I filled the password and clicked the "Alias" drop down menu, there always this error message:
ArgumentException: An empty file name is not valid.
System.IO.FileSystemInfo.CheckPath (System.String path)
System.IO.DirectoryInfo..ctor (System.String path, Boolean simpleOriginalPath)
System.IO.DirectoryInfo..ctor (System.String path)
(wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:.ctor (string)
UnityEditor.AndroidKeystoreWindow.findPathWildcard (System.String str)
UnityEditor.AndroidKeystoreWindow.LocateJDKbin ()
UnityEditor.AndroidKeystoreWindow.setupKeytool ()
UnityEditor.AndroidKeystoreWindow.GetAvailableKeys (System.String keystore, System.String storepass)
UnityEditor.PlayerSettingsEditor.PublishSectionGUI (Int32 selectedPlatform)
UnityEditor.PlayerSettingsEditor.OnInspectorGUI ()
UnityEditor.InspectorWindow.DrawEditors (Boolean isRepaintEvent, UnityEditor.Editor[] editors, Boolean eyeDropperDirty)
UnityEditor.InspectorWindow.OnGUI ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)
This also the case when I tried to build create a new keystore, after I filled in all the details like name, organization, validity etc, the same error message appear after clicking the "Create Key" button.
I didn't do anything with the project and I knew that the keystore works properly as I just used it yesterday.
I'm using Mac OSX Mountain Lion 10.8.2 and Unity Pro 3.5.6f4. Not sure what happened.. I don't want to end up reformatting my mac.
Thanks in advance.
Answer by naticis · Dec 09, 2012 at 06:48 AM
Uninstall JDK 7 and install JDK 6. I had a similar problem with Java JDK 1.7, I'm using JDk 6.27 on Windows 7 and everything works fine.
Thanks for the answer, but it doesn't work. $$anonymous$$ine was actually version 1.6, I even tried to install the JD$$anonymous$$ 1.7.0.9, then revert it back again to 1.6 but still no luck..