Unbuntu下Android studio報Unable to recreate missing debug keystore錯誤

      最近在用ubuntu下使用android studio調試程序時,報出以下錯誤:

         Execution failed for task ':app:validateDebugSigning'.
         > Unable to recreate missing debug keystore.

    這個是由於android studio需要自動重新生成keystore時,沒有權限。keystore文件默認是在/root/.android目錄下。

    要解決這個問題可以參考以下方法:

     一 http://stackoverflow.com/questions/21415156/unable-to-recreate-missing-debug-keystore

     二可以自己手動生成一個keystore,然後添加到項目中,在build.gradle文件中添加

android {
    signingConfigs {
        debug {
            storeFile file('your keyStore')
        }
    }
}
     也可以通過android studio  File-》ProjectStructure-》signing 選擇自己的keystore添加。

      android studio生成keystore方法,請參考(也可自己搜資料,比較簡單):

      http://www.mobibrw.com/?p=1876

發佈了42 篇原創文章 · 獲贊 19 · 訪問量 14萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章