[Android] cocos2d-x build_native.sh permission deny

posted in: 未分類 | 0

 

會產生這個問題,是由於權限的關係,除了可以使手動或使用指令去給予權限之外(參閱),還可以寫批次檔來處理。首先先建立一個檔案:get_all_permission.reg,然後內容設置如下:

Windows Registry Editor Version 5.00

 

[HKEY_CLASSES_ROOT\*\shell\runas]

 

@="get all permission"

 

"NoWorkingDirectory"=""

 

[HKEY_CLASSES_ROOT\*\shell\runas\command]

 

@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"

 

"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"

 

[HKEY_CLASSES_ROOT\exefile\shell\runas2]

 

@="get all permission"

 

"NoWorkingDirectory"=""

 

[HKEY_CLASSES_ROOT\exefile\shell\runas2\command]

 

@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"

 

"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"

 

[HKEY_CLASSES_ROOT\Directory\shell\runas]

 

@="get all permission"

 

"NoWorkingDirectory"=""

 

[HKEY_CLASSES_ROOT\Directory\shell\runas\command]

 

@="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"

 

"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t

 

在成功登入到登入檔之後,在專案資料夾上按右鍵,便可以看到多出一個get_all_permission的選項。在執行之後,便可以順利的建立出.so檔。

Leave a Reply

Your email address will not be published. Required fields are marked *