2016-06-07 64 views
3

我試圖建立與此instruction的Android鉻完整的瀏覽器的apk構建問題

但在GN configuration一步我有以下問題鉻的Android APK後的參數文件編輯和保存

ERROR at //build/config/android/internal_rules.gni:1966:13: Script returned non-zero exit code. 
      exec_script("//build/android/gyp/find.py", 
      ^---------- 
Current dir: /home/artem/chromium/src/out/Default/ 
Command: python -- /home/artem/chromium/src/build/android/gyp/find.py ../../third_party/android_tools/sdk/extras/google/google_play_services/libproject/google-play-services_lib/res 
Returned 1. 
stderr: 

../../third_party/android_tools/sdk/extras/google/google_play_services/libproject/google-play-services_lib/res does not exist 

See //build/config/android/rules.gni:634:3: whence it was called. 
    process_resources(process_resources_target_name) { 
    ^------------------------------------------------- 
See //third_party/android_tools/BUILD.gn:120:1: whence it was called. 
android_resources("google_play_services_default_resources") { 
^------------------------------------------------------------ 
See //base/BUILD.gn:1074:7: which caused the file to be included. 
     "//third_party/android_tools:cpu_features", 
     ^----------------------------------------- 

然後我嘗試手動下載谷歌與命令from this issue thread發揮服務:

sudo ./build/android/play_services/update.py download 

而得到這樣的警告:

Your version of the Google Play services library is not up to date. You might run into issues building or running the app. Please run `./build/android/play_services/update.py download` to retry downloading it. 

之後,我嘗試建立完整的瀏覽器的apk

ninja -C out/Default chrome_public_apk 

,並得到錯誤:

ninja: Entering directory `out/Default' 
ninja: fatal: chdir to 'out/Default' - No such file or directory 

有沒有解決這個問題,並建立工作的apk文件的方式?

回答

2

這個工作對我來說:

  1. 運行此命令在鉻文件夾: git rebase-update gclient sync

  2. 下載谷歌播放服務: sudo ./build/android/play_services/update.py download

  3. 配置GN:gn args opt/Full

  4. 將此行添加到文件:target_os="android"
  5. 用命令建立apk:ninja -C opt/Full chrome_public_apk