久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

API 23 Google API 仿真器映像 (armeabi-v7a) 上的 Gradle

Gradle commands fail on API 23 Google API emulator image (armeabi-v7a)(API 23 Google API 仿真器映像 (armeabi-v7a) 上的 Gradle 命令失敗)
本文介紹了API 23 Google API 仿真器映像 (armeabi-v7a) 上的 Gradle 命令失敗的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我似乎無法從命令行獲取 Gradle 命令以使用 API 23 Google API 仿真器映像(Google APIs ARM (armeabi-v7a)) - 我總是得到一個 com.android.ddmlib.ShellCommandUnresponsiveException.

I can't seem to get Gradle commands from the command line to work with the API 23 Google API emulator image (Google APIs ARM (armeabi-v7a)) - I always get a com.android.ddmlib.ShellCommandUnresponsiveException.

重現步驟:

  1. 使用 API 23 創建 AVD Google APIs ARM (armeabi-v7a)
  2. 克隆https://github.com/googlemaps/android-maps-utils(或者使用你自己的項目)
  3. 從命令行運行 gradlew installDebug
  1. Create an AVD with API 23 Google APIs ARM (armeabi-v7a)
  2. Clone https://github.com/googlemaps/android-maps-utils (or use your own project)
  3. Run gradlew installDebug from the command line

你會看到:

:demo:assembleDebug:demo:installDebug 失敗

:demo:assembleDebug :demo:installDebug FAILED

FAILURE:構建失敗并出現異常.

FAILURE: Build failed with an exception.

  • 出了什么問題:

任務:demo:installDebug"執行失敗.com.android.builder.testing.api.DeviceException: com.android.ddmlib.ShellCommandUnresponsiveException

Execution failed for task ':demo:installDebug'. com.android.builder.testing.api.DeviceException: com.android.ddmlib.ShellCommandUnresponsiveException

如果你運行 gradlew connectedCheck 你會看到類似的錯誤:

If you run gradlew connectedCheck you'll see a similar error:

  • 出了什么問題:任務 ':library:connectedDebugAndroidTest' 執行失敗.com.android.builder.testing.api.TestException: com.android.builder.testing.api.DeviceException: com.android.ddmlib.ShellCommandUnresponsiveException

可以從 Android Studio (1.4) 安裝/運行項目和測試,沒有任何問題.

I can install/run the project and tests from Android Studio (1.4) without any problems.

Gradle 命令似乎在命令行的 API 21 Google API 模擬器映像上運行良好.

Gradle commands seem to run fine on the API 21 Google API emulator image from the command line.

以下是 Travis for API 23 Google API 模擬器圖像的示例失敗:

Here is an example failure on Travis for API 23 Google API emulator image:

https://travis-ci.org/barbeau/android-maps-utils/builds/83233500

...以及使用 API 21 Google API 模擬器映像時成功構建的示例:

...and an example successful build when using the API 21 Google API emulator image:

https://travis-ci.org/barbeau/android-maps-utils/builds/83234555

兩個版本之間的唯一區別是 Google API 模擬器 API 級別為 23 與 21:

The only difference between the two builds is the Google API emulator API level of 23 vs. 21:

https://github.com/barbeau/android-maps-utils/commit/a5eecd7e7a4fc899ecd5eaeae6826414fefeae70

編輯

我在此問題上打開了一個 AOSP 問題:

I've opened an AOSP issue here on this problem:

https://code.google.com/p/android/issues/detail?id=190200

推薦答案

簡答

Android Gradle 插件的硬編碼超時值太低.

Android Gradle Plugin had a hardcoded timeout value that was too low.

Google 在 版本 2.0.0-beta3:

將在 2.0.0-beta3 中.

Will be in 2.0.0-beta3.

那么我們在 build.gradle 中放入什么來設置這個超時值呢?

So what do we put in build.gradle to set this timeout value?

目前它全部附加到 android.adbOptions.timeOutInMs.

Currently it's all attached to android.adbOptions.timeOutInMs.

示例:Google 項目 增加 ADB 超時時間 和 添加 Travis-ci 支持.它有效!.

Sample: Google project Increasing ADB timeout and adding Travis-ci support. It works!.

之前的回復

這是 此處報告的相同問題

閱讀 unity3 開發人員的解決方法 關于這里的硬編碼和低超時

Read the workaround from the unity3 developer about the hardcoded and low timeout here

star 問題

你是對的.這不是 Travis-ci 的問題,要重現它,您只需要創建一個 armeabi-v7a 模擬器并嘗試通過 gradle 命令在本地安裝任何應用程序.

You are right. It's not a Travis-ci issue, to reproduce it, you only need to create an armeabi-v7a emulator and try to install any app locally from gradle command.

更多信息這里,我的答案的更新3

更新:

您可以使用 adb 避免 installVariant 任務和此問題:

You can avoid the installVariant tasks and this issue using adb:

./gradlew clean
./gradlew assembleDebug
./gradlew assembleDebugAndroidTest
adb install app/build/outputs/apk/app-debug.apk
adb install app/build/outputs/apk/app-debug-androidTest-unaligned.apk
adb shell am instrument -w com.google.samples.apps.topeka.test/android.support.test.runner.AndroidJUnitRunner

有效:

...
:app:assembleDebugAndroidTest

BUILD SUCCESSFUL
Total time: 19.787 secs
2413 KB/s (4204090 bytes in 1.701s)
    pkg: /data/local/tmp/app-debug.apk
Success
1984 KB/s (1058902 bytes in 0.521s)
    pkg: /data/local/tmp/app-debug-androidTest-unaligned.apk
Success

com.google.samples.apps.topeka.activity.SignInActivityTest:.
com.google.samples.apps.topeka.activity.quiz.EntertainmentQuizTest:.
com.google.samples.apps.topeka.activity.quiz.GeneralKnowledgeQuizTest:..

這篇關于API 23 Google API 仿真器映像 (armeabi-v7a) 上的 Gradle 命令失敗的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

IncompatibleClassChangeError after updating to Android Build Tools 25.1.6 GCM / FCM(更新到 Android Build Tools 25.1.6 GCM/FCM 后出現 IncompatibleClassChangeError)
How to get current flavor in gradle(如何在 gradle 中獲取當前風味)
How to fix quot;unexpected element lt;queriesgt; found in lt;manifestgt;quot; error?(如何修復“意外元素lt;查詢gt;在“清單中找到錯誤?)
Multi flavor app based on multi flavor library in Android Gradle(基于 Android Gradle 中多風味庫的多風味應用)
Android dependency has different version for the compile and runtime(Android 依賴在編譯和運行時有不同的版本)
Transitive dependencies for local aar library(本地 aar 庫的傳遞依賴)
主站蜘蛛池模板: 天天拍夜夜爽 | 亚洲福利在线观看 | 亚洲免费在线播放 | 国产精品国产三级国产aⅴ中文 | 日韩av免费在线观看 | 黄色一级电影在线观看 | 九九热精品视频 | 久久这里只有精品首页 | 日韩精品免费在线观看 | 一区二区三区日韩 | 精品美女视频在线观看免费软件 | 国产精品免费看 | 黄色大片视频 | 国产激情视频网站 | www.色午夜.com | 日韩欧美三级电影在线观看 | 91久久精品一区 | 久久久久久久国产精品影院 | 久久国产精品久久久久久 | 一区二区三区av | 国产成人99久久亚洲综合精品 | 成人中文字幕在线观看 | 一区二区av | 国产亚洲成av人在线观看导航 | 国产视频第一页 | 国产精品欧美一区二区三区不卡 | 久久97精品 | 日韩精品 电影一区 亚洲 | 中文字幕亚洲视频 | av在线视 | 宅女噜噜66国产精品观看免费 | 欧美日韩亚洲一区 | 激情五月婷婷综合 | 亚洲欧美日韩精品久久亚洲区 | 在线观看国产视频 | 国产在线观 | 欧美日韩久久久 | 久久99久久99久久 | 日韩成人免费av | 国产95在线 | 日日摸天天添天天添破 |