发现一个问题:ActivityTestRule这个类无法识别,如下图所示:
Error:(11, 15) Cannot resolve symbol 'GradleException' (See image below) Local.properties file (See image below) Flutter Doctor output (See Image below) The same problem occurs in my customer project as well (same project settings).
def flutterVersionName = localProperties.getProperty('flutter.versionName') if (flutterVersionName == null) { throw new GradleException("versionName not found. Define flutter.versionName in the local.properties file.") } apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/...
之前解决的没记录。 报错1 报错内容 FAILURE: Build failed with an exception.What went wrong:A problem occurred configuring root project 'android'.Could not open cp_proj generic class cache for build file 'D:\WORK\myLearningWork\development\untitled4\android\build.gradle' (C:\Users\YUAN.gradle\c...
* Get more help at https://help.gradle.org BUILD FAILED in 5m 6s 解决方法[1]: Android项目的build.gradle allprojects { repositories { ... //添加这一行 maven { url "https://storage.googleapis.com/download.flutter.io" } } } 0x
BUILD FAILEDin1sException:Gradletask assembleDebug failedwithexit code1 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 解决办法 JDK的版本不合适。我升级到了JDK19,然后又退回到了JDK11 报错2 报错内容 Cannotresolve symbol'Properties' ...
classpath 'com.android.tools.build:gradle:3.3.1' 然后删除 ext.kotlin_version = '1.3.31' 在grable.properties 下添加 1 2 android.useAndroidX=true android.enableJetifier=true 之后sync 即可. 记得要FQ 文件如图所示: 其他方案:https://github.com/flutter/flutter/issues/27254 ...
先在项目根目录下的build.gradle下把 classpath 'com.android.tools.build:gradle:3.2.1' 改为 classpath 'com.android.tools.build:gradle:3.3.1' 然后删除 ext.kotlin_version = '1.3.31' 在grable.properties 下添加 1 2 android.useAndroidX=true ...
gradle构建时报错: A problem occurred configuring project ':app'. > Could not resolve all dependencies for configuration ':app:playDebugRuntimeClasspath'. > More than one variant of project :flutter matches the consumer attributes: - Configuration ':flutter:debugRuntimeElements' variant android-...
classpath'com.android.tools.build:gradle:3.3.1' 然后删除 ext.kotlin_version='1.3.31' 在grable.properties 下添加 android.useAndroidX=true android.enableJetifier=true 之后sync 即可. 记得要翻墙 文件如图所示: 其他方案:https://github.com/flutter/flutter/issues/27254 ...