Search Unity

Error in building and signing APK

Discussion in 'Android' started by dede_touchten, Dec 8, 2012.

  1. dede_touchten

    dede_touchten

    Joined:
    Jul 11, 2012
    Posts:
    6
    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:

    Code (csharp):
    1. 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:

    Code (csharp):
    1. ArgumentException: An empty file name is not valid.
    2.     System.IO.FileSystemInfo.CheckPath (System.String path)
    3.     System.IO.DirectoryInfo..ctor (System.String path, Boolean simpleOriginalPath)
    4.     System.IO.DirectoryInfo..ctor (System.String path)
    5.     (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:.ctor (string)
    6.     UnityEditor.AndroidKeystoreWindow.findPathWildcard (System.String str)
    7.     UnityEditor.AndroidKeystoreWindow.LocateJDKbin ()
    8.     UnityEditor.AndroidKeystoreWindow.setupKeytool ()
    9.     UnityEditor.AndroidKeystoreWindow.GetAvailableKeys (System.String keystore, System.String storepass)
    10.     UnityEditor.PlayerSettingsEditor.PublishSectionGUI (Int32 selectedPlatform)
    11.     UnityEditor.PlayerSettingsEditor.OnInspectorGUI ()
    12.     UnityEditor.InspectorWindow.DrawEditors (Boolean isRepaintEvent, UnityEditor.Editor[] editors, Boolean eyeDropperDirty)
    13.     UnityEditor.InspectorWindow.OnGUI ()
    14.     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.
     
  2. bingeel

    bingeel

    Joined:
    Dec 11, 2012
    Posts:
    3
    I have this problem too. Unity 3.5.6f4, MacOS 10.7.5, JDK 1.6.0_29. where is the problem?
     
  3. dede_touchten

    dede_touchten

    Joined:
    Jul 11, 2012
    Posts:
    6
    Not sure where's the problem. But I ended up reformatting my mac and reinstalling all my apps from zero, and now it works again.

    PS: I've tried to reformat and restore all my apps, user folders, and system settings with migration assistant but the error was still there. But when I reformat again and this time I only migrate the user folders (without the applications system settings), it now works perfectly.

    I guess the problem is with some of the installed apps in your mac or conflicting with system settings.
     
  4. bingeel

    bingeel

    Joined:
    Dec 11, 2012
    Posts:
    3
    I'm not in a position to do a reformat. I reinstalled Unity with no luck. When I try to use "Browse Keystore" it won't let me select any files, is there are particular file extension its looking for?
     
  5. bingeel

    bingeel

    Joined:
    Dec 11, 2012
    Posts:
    3
    updating java to 1.6.0._37 seems to have fixed my issue.
     
  6. zerocorp

    zerocorp

    Joined:
    Nov 29, 2012
    Posts:
    4
    when I try to compile my Android application I get this error "" An empty file is not valid "right after adding l sdk path I get the error. I work from a mac 10.8.2, Unity3D 4, java 7. someone poria would greatly appreciate help.