Incorrect DebugKeyStorePath

血红的双手。 提交于 2019-12-11 19:49:14

问题


The 'Debug Android Key Hash' in the Inspector FaceBookSettings does not work (Windows7) because it uses an incorrect DebugKeyStorePath. This is caused because the drive ("C:\") is not included in the HOMEPATH.

Only System.Environment.GetEnvironmentVariable("HOMEPATH") is used to build the path, which does not contain the drive. For the full path the System.Environment.GetEnvironmentVariable("HOMEDRIVE") should be added in front of the path.

Until now I manually fix this after each SDK update by modifying FacebookAndroidUtil.cs:

private static string DebugKeyStorePath
{
    get
    {
        return (Application.platform == RuntimePlatform.WindowsEditor) ?
           System.Environment.GetEnvironmentVariable("HOMEDRIVE") + //FIX PATH!!!
           System.Environment.GetEnvironmentVariable("HOMEPATH") + 
           @"\.android\debug.keystore" : 
           System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal) +
           @"/.android/debug.keystore";
    }
}

I have not checked if it is fixed in SDK 5.1 BETA because the link currently downloads FacebookSDK-140101-beta and not FacebookSDK-140401-beta (probably just a wrong filename, but to be sure I skipped that update for now).


回答1:


This is fixed in Facebook SDK v6.0



来源:https://stackoverflow.com/questions/22881637/incorrect-debugkeystorepath

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!