我已经用Flutter在VS代码上创建了一个应用程序,在我开始准备构建应用程序之前,没有任何问题。我开始将包名从“com.example.careona19”更改为“com.covid19rsa.app”,但随后开始出现以下错误:
```Launching lib\main.dart on VOG L09 in debug mode...
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\pkirby\development\careona19\android\app\build.gradle' line: 24
* What went wrong:
A problem occurred evaluating project ':app'.
> Plugin with id 'com.covid19rsa.app' not found.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 16s
Gradle task assembleDebug failed with exit code 1
Exited (sigterm)```
```buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
//classpath 'com.android.tools.build:gradle:3.5.0' - original
//classpath 'com.android.tools.build:gradle:3.3.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.2.0'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
```
```def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.covid19rsa.app'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
//apply plugin: 'com.google.gms.google-services'
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 28
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.covid19rsa.app"
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.12'
implementation 'com.google.firebase:firebase-core:16.0.1'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
//implementation 'com.google.firebase:firebase-analytics:17.2.2'
}
apply plugin: 'com.google.gms.google-services'
```
这一行的问题是:
apply plugin: 'com.covid19rsa.app'
您必须使用:
apply plugin: 'com.android.application'
在使用gradle--stacktrace之后,我得到以下错误: 运行gradle后--信息 你知道这个问题怎么解决吗?
当我试图运行我的应用程序时,我遇到了以下错误。 评估项目: app时出现问题。 提供的字符串模块表示法“commons io:common无法解析配置的所有依赖项”:app:debugRuntimeClasspath。s-io:2.6'无效。示例注释:“org。gradle:gradle核心:2.2','组织。mockito:mockito核心:1.9.5:javadoc'。 >
当项目已经运行状态时,这个错误不会发生。但是第二天我试图运行同一个项目,然后这个错误就出现了。 失败:生成失败,出现异常。 > 其中:生成文件'D:\src\flatter。发布缓存\托管\发布。达特朗。org\firebase\u auth-3.2.0\android\build。格雷德尔热线:58 错误:评估项目时出现问题:firebase_auth。 无法从缓存加载脚本'D:\src\flu
失败:生成失败,出现异常。 > 其中:构建文件'/users/blickx/desktop/dumont-reactnative/dumont/node_modules/@react-native-community/async-storage/android/Build.gradle'行:36 错误:评估项目':@react-native-community_async-storage'时出现问
我有一个react原生应用程序,当我试图在我的android设备上运行它时,我得到以下错误: null
评估项目': tflite'时出现问题。 没有方法的签名:build _ 29 ou 9 K6 cal 0 PML 6 qvuo 3 exmb 2 . Android()适用于参数类型:(build _ 29 ou 9 K6 cal 0 PML 6 qvuo 3 exmb 2 $ _ run _ closure 2)值:[build _ 29 ou 9 K6 cal 0 PML 6 qvuo 3