【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:processDebugResources‘.AIAPP
- Execution failed for task ':app:compileDebugJavaWithJavac'AIAPPCompileJava
- Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. > com.android.build.aErrorAIAPPORMJARAndroidUI
- 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
- Oracle /app/grid/grid11g/crs/install/roothas.pl execution failedOracleAPPAI
- [ERROR] Failed to open logErrorAI
- AndroidStudio解決Error:Unabletostartthedaemonprocess.AndroidError
- FATAL ERROR IN TWO-TASK SERVER: error = 12569ErrorServer
- Error:A problem was found with the configuration of task ':app:packageDebug' 問題解決ErrorAPPPackage
- OPatch failed with error code 73AIError
- 【MySQL】mysqldump Error 3024: Query execution was interruptedMySqlError
- FATAL ERROR IN TWO-TASK SERVER: error = 12152ErrorServer
- Error: failed PB timebomb checkErrorAI
- AndroidStudio 建立 Hybrid App工程AndroidAPP
- maridb Error 'Operation DROP USER failed forErrorAI
- Opiino: Attach Failed! Error=-1 Ifvp=0AIError
- "Failed to create empty document" error message appears when opening the BrightStor ARCserve BackupAIErrorAPP
- FATAL - Fatal error: Target Interaction Manager failed at StartupErrorAI
- Android 3.0 DELETE_FAILED_INTERNAL_ERRORAndroiddeleteAIError
- Bypass McAfee Application Control——Code ExecutionAPP
- Java併發程式設計實戰系列6之任務執行(Task Execution)Java程式設計
- This task rrequires the application to have elevated permissionsUIAPP
- 解決AndroidStudio建立模擬器時unknown errorAndroidError
- app:processReleaseResources, Failed to execute aaptAPPAIAPT
- Error: Connection activation failed: Device not managed by NetworkManagerErrorAIdev
- ERROR: Failed to resolve: org.greenrobot:eventbus:2.4.0ErrorAI
- weblogic報錯: OPatch failed with error code 73WebAIError
- OPatch failed with error code 73(OracleHomeInventory gets null oracleHomeInfo)AIErrorOracleNull
- LOGIN:ERROR-Failed to initialize policy manager(轉)ErrorAI
- "OPatch failed with error code 73"故障一例AIError
- [筆記].痛哉!!!Error: Can't access JTAG chain, Error: Operation failed筆記ErrorAI
- git error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500GitErrorRPCAIHTTP
- AndroidStudio編譯時報錯Error:Please select Android SDKAndroid編譯Error
- docker dm_task_run failed 啟動失敗解決辦法DockerAI
- idea 報錯maven [ERROR] Maven execution terminated abnormally (exit code 1)IdeaMavenErrorORM