【AndroidStudio】Error:Execution failed for task ':app:preDebugAndroidTestBuild'.
AS中解決Error:Execution failed for task ':app:preDebugAndroidTestBuild'.問題。
1、開啟對應的app中的build.gradle檔案
2、在build.gradle的dependencies依賴中增加如下配置資訊
androidTestCompile('com.android.support:support-annotations:26.1.0') {
force = true
}
增加配置後的配置如下:
dependencies {
androidTestCompile('com.android.support:support-annotations:26.1.0') {
force = true
}
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:design:26.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
相關文章
- Execution failed for task ':app:compileDebugJavaWithJavac'AIAPPCompileJava
- Execution failed for task ‘:app:processDebugResources‘.AIAPP
- Execution failed for task ‘:demo:stripReleaseDebugSymbols‘.AISymbol
- RuntimeError: cuDNN error: CUDNN_STATUS_EXECUTION_FAILED解決辦法ErrorDNNAI
- Camunda中的Execution listeners和Task listeners
- 【ERROR】OPatch failed with error code 73ErrorAI
- OPatch failed with error code 73AIError
- Error: Connection activation failed: Device not managed by NetworkManagerErrorAIdev
- AndroidStudio編譯時報錯Error:Please select Android SDKAndroid編譯Error
- idea 報錯maven [ERROR] Maven execution terminated abnormally (exit code 1)IdeaMavenErrorORM
- FATAL - Fatal error: Target Interaction Manager failed at StartupErrorAI
- ERROR: Failed to resolve: org.greenrobot:eventbus:2.4.0ErrorAI
- weblogic報錯: OPatch failed with error code 73WebAIError
- app:processReleaseResources, Failed to execute aaptAPPAIAPT
- git error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500GitErrorRPCAIHTTP
- 【微信小程式】[雲函式] [login] 呼叫失敗 Error: errCode: -404011 cloud function execution error微信小程式函式ErrorCloudFunction
- AndroidStudio點選兩次返回鍵,退出APPAndroidAPP
- 解決 yum clean all Error rpmdb open failedErrorAI
- PSQLException: ERROR: failed to find conversion function from unknown to charSQLExceptionErrorAIFunction
- AndroidStudio之app/build.gradle問題集錦AndroidAPPUIGradle
- error in ./src/components/form/Editor.vue Module build failed: Error:Vue packages version mismatchErrorORMVueUIAIPackage
- python爬蟲--urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certiPython爬蟲ErrorAI
- ascp: Failed to open TCP connection for SSH, exiting. Session Stop (Error: Failed to open TCP connection for SSH)AITCPSessionError
- Java併發程式設計實戰系列6之任務執行(Task Execution)Java程式設計
- ERROR:Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODINGErrorAIEncoding
- Error: pngquant failed to build, make sure that libpng-dev is installedErrorAIUIdev
- ERROR: failed to establish dependency between database db_name and diskgroupErrorAIDatabase
- Error - RtlWerpReportException failed with status code :-1073741823. Will try to launch the processErrorExceptionAI
- ElasticSearch啟動報錯 ERROR: [4] bootstrap checks failedElasticsearchErrorbootAI
- error: install: %pre scriptlet failed (2), skipping cvuqdisk-1.0.9-1ErrorAI
- error: RPC failed; curl 18 transfer closed with outstanding read data remainingErrorRPCAIREM
- wsl損壞,WSLRegisterDistribution Failed with Error 0x8007019eAIError
- Job for docker.service failed because the control process exited with error codeDockerAIError
- bind (ERROR 502): bind(0.0.0.0:8811) failed. Error: Address already in use [98] (埠被佔用)ErrorAI
- ubuntu下pig報錯ERROR 2999: Unexpected internal error. Failed to create DataStorage的解決UbuntuErrorAIAST
- docker dm_task_run failed 啟動失敗解決辦法DockerAI
- PING[ARC5]: Heartbeat failed to connect to standby 'dghq'. Error is 12154.AIError
- Network Error;net::ERR_FAILED(請求跨越)前後端ErrorAI後端