Androidstudio报错:Could not find method androidTestCompile()
报错 not Find could method AndroidStudio
2023-09-14 09:16:14 时间
gradle报错:
Could not find method androidTestCompile() for arguments [directory 'libs']
原因:高版本的gradle已经不支持Compile()、TestCompile()、androidTestCompile()等。
解决
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}
以上代码修改为:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:25.3.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
}
相关文章
- vue3 报错解决:找不到模块‘xxx.vue’或其相应的类型声明。(Vue 3 can not find module)
- 二进制安装MySQL报错FATAL ERROR: Could not find my_print_defaults
- 【错误记录】Ubuntu 中执行 Java 程序报错 ( Error: Could not find or load main class TCPServer )
- 【错误记录】Windows 控制台程序编译报错 ( WINDOWS.H already included. MFC apps must not #include <Windows.h> )
- ORA-01002: fetch out of sequence ORACLE 报错 故障修复 远程处理
- ORA-19801: initialization parameter DB_RECOVERY_FILE_DEST is not set ORACLE 报错 故障修复 远程处理
- ORA-19923: the session for row with id string is not active ORACLE 报错 故障修复 远程处理
- ORA-22344: can not specify CONVERT TO SUBSTITUTABLE option for ALTER TYPE other than NOT FINAL change ORACLE 报错 故障修复 远程处理
- ORA-22863: synonym for datatype string.string not allowed ORACLE 报错 故障修复 远程处理
- ORA-22886: scoped table “string” in schema “string” is not an object table ORACLE 报错 故障修复 远程处理
- ORA-23533: object “string”.”string” can not be cached ORACLE 报错 故障修复 远程处理
- ORA-24050: subscribers are not supported for exception queue string ORACLE 报错 故障修复 远程处理
- ORA-24428: Sessions with SYSDBA privileges are not supported in this mode. ORACLE 报错 故障修复 远程处理
- ORA-25127: RELY not allowed in NOT NULL constraint ORACLE 报错 故障修复 远程处理
- ORA-26010: Column string in table string is NOT NULL and is not being loaded ORACLE 报错 故障修复 远程处理
- ORA-26760: Could not find message number string for transaction with id string ORACLE 报错 故障修复 远程处理
- ORA-29771: process string (OSID string) blocks string (OSID string) for more than string seconds ORACLE 报错 故障修复 远程处理
- ORA-26930: User “string” does not have privileges to perform this operation ORACLE 报错 故障修复 远程处理
- ORA-31523: could not find change source string for CDC change set string ORACLE 报错 故障修复 远程处理
- ORA-31524: could not find change set string for CDC change table string.string ORACLE 报错 故障修复 远程处理
- ORA-32414: materialized view logs are not compatible with each other for fast refresh ORACLE 报错 故障修复 远程处理
- ORA-46089: Unsupported verifier type ORACLE 报错 故障修复 远程处理
- ORA-48914: File position is not in right format ORACLE 报错 故障修复 远程处理
- MySQL Error number: 3795; Symbol: ER_SLOW_LOG_MODE_IGNORED_WHEN_NOT_LOGGING_TO_FILE; SQLSTATE: HY000 报错 故障修复 远程处理
- MySQL Error number: MY-011702; Symbol: ER_GRP_RPL_SQL_SERVICE_COMM_SESSION_NOT_INITIALIZED; SQLSTATE: HY000 报错 故障修复 远程处理
- ORA-12520: TNS:listener could not find available handler for requested type of server ORACLE 报错 故障修复 远程处理
- ORA-15327: remote ASM is not enabled ORACLE 报错 故障修复 远程处理