- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
任务':location:compileDebugKotlin'执行失败。
build:gradle(模块:app)
ext.kotlin_version = '1.6.10'
repositories {
maven {
//url 'https://dl.google.com/dl/android/maven2',
url 'http://download.flutter.io'
}
google()
mavenCentral()
}
dependencies {
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.android.tools.build:gradle:4.+'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.4.1'
//classpath("com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.0")
}
}
allprojects {
repositories {
maven {
apply plugin: 'maven'
//url 'https://dl.google.com/dl/android/maven2',
url 'http://download.flutter.io'
}
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
构建:gradle(项目)
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 FileNotFoundException ("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '4'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 31
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.develpment.sported_app"
minSdkVersion 23
targetSdkVersion 29
multiDexEnabled true
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
//release {
release {
profile {
matchingFallbacks = ['debug', 'release']
}
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
//}
}
lintOptions {
disable 'InvalidPackage'
checkReleaseBuilds false
}
}
flutter {
source '../..'
}
dependencies {
implementation "com.android.support:multidex:1.0.3"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation 'com.android.support:support-annotations:28.0.0'
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
已尝试的解决方案:
./gradlew assembleDebug
flutter doctor
和 flutter clean
之前我尝试构建发布和发布构建,但某些功能无法正常工作。于是我环顾四周,发现我应该在android部分的MainActivity.kt的main方法中添加下面的代码,这就是这个问题开始的时候。我什至尝试将方法注释掉,但错误仍然存在。
覆盖有趣的 configureFlutterEngine(@NonNull flutterEngine:FlutterEngine){GeneratedPluginRegistrant.registerWith(flutterEngine);}
最佳答案
我更新了我所有的项目包。这为我解决了这个问题。
关于android - Flutter:任务 ':location:compileDebugKotlin' 执行失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71781763/
失败:构建失败,出现异常。 出了什么问题:任务“:react-native-screens:compileDebugKotlin”执行失败。 Error while evaluating proper
更新到 Dart 3.0 后,当我在 Android 模拟器上启动应用程序时出现此错误。 对于 iOS 物理设备,它的构建还可以。不幸的是,无法尝试使用 Android 物理设备。有任何想法吗? e:
尝试将我的 Flutter 应用程序编译到 Android 模拟器时,我遇到了这个令人讨厌的错误。这是错误日志(太长,无法完全粘贴): aunching lib/main.dart on sdk gp
关闭。这个问题需要debugging details .它目前不接受答案。 编辑问题以包含 desired behavior, a specific problem or error, and the
我尝试安装 audioplayers: ^0.17.1并运行我的 flutter 项目。它引发以下错误。有人可以帮忙吗? e: C:\Users\User\flutter\.pub-cache\hos
我尝试使用 gradle-plugin 在 Jenkins 中构建我的 apk,但由于 Internal compiler error 该项目是用Kotlin编写的 在 Jenkins 中,我在 sv
我最近更新了我的 kotlin 和 kotlin 扩展插件,并且在构建时出现以下错误。我尝试使用 gradle 清理构建或同步项目,但没有任何效果 e: Supertypes of the follo
我正在做一个旧项目。它在 5 天前运行良好。现在我正面临agora 的错误。我之前的代码没有任何改变。 这是错误- FAILURE: Build failed with an exception. *
任务':location:compileDebugKotlin'执行失败。 build:gradle(模块:app) ext.kotlin_version = '1.6.10' rep
Kotlin Gradle 插件在不同的子项目中多次加载,不受支持并且可能会破坏构建。 这可能发生在应用带有 Gradle 'plugins { ... }' DSL 的 Kotlin 插件的子项目中
我正在开发一个 React Native 应用程序,其中包含了一些 expo 库(裸工作流)。我已经成功使用了expo-location ,但现在我也安装了expo-camera ,应用程序将不再使用
我尝试从 运行默认的 flutter 应用程序 flutter 创建 在我的 android 设备上,但它给我一个错误。有人可以帮忙吗? Launching lib\main.dart on SM G
更新完我的flutter工程,准备在android studio中运行应用,出现如下错误。 e: C:\Users\user\AppData\Local\Pub\Cache\hosted\pub.da
我不知道我是如何陷入这个困境的,但我认为问题出在Java二进制路径上......来自flutter doctor的路径与异常中的路径不同。当我运行现有项目或创建新项目并尝试运行它时,它仍然会给出相同的
我已将 Android Studio 更新为 3.3,现在我无法构建现有项目之一,我尝试过无效/重启,还检查了 gradle -wrapper.properties其中gradle版本是最新更新: d
Error:Execution failed for task ':app:compileDebugKotlin'. > Compilation error. See log for more det
我已遵循此页面中的所有说明:https://flutter.dev/docs/get-started/install/windows 但是当我尝试运行“first_app”时出现错误: Android
注意:某些输入文件使用或覆盖已弃用的 API。注意:使用 -Xlint:deprecation 重新编译以获取详细信息。注意:某些输入文件使用未经检查或不安全的操作。注意:使用 -Xlint:unch
注意:某些输入文件使用或覆盖已弃用的 API。注意:使用 -Xlint:deprecation 重新编译以获取详细信息。注意:某些输入文件使用未经检查或不安全的操作。注意:使用 -Xlint:unch
我正在将我的 Android 项目从 Java 转换为 Kotlin。我已经和其他 3 个项目成功地完成了这个过程。 但是这个有点大,结构复杂。我已将一些文件转换为 Kotlin 并进行项目编译。但是
我是一名优秀的程序员,十分优秀!