Ниже приведен мой файл app/build.gradle.
plugins {
id "com.android.application"
id "kotlin-android"
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id "dev.flutter.flutter-gradle-plugin"
}
android {
namespace = "com.cartrackernigeria.ctntelematics"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/bu ... on-id.html).
applicationId = "com.cartrackernigeria.ctntelematics"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = 21//flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig = signingConfigs.debug
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
flutter {
source = "../.."
}
Ниже находится файл settings.gradle
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.3.2" apply false
// id "com.android.application" version "8.1.0" apply false
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
}
include ":app"
Ниже мой android/build.gradle
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = "../build"
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(":app")
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
Я получаю эту ошибку ниже каждый раз, когда пытаюсь запустить проект flutter.
Я пробовал все, что мог, но не понимаю, а pusher жалуется на пространство имен . Я пробовал несколько версий пакета pusher, например
- pusher_client
- pusher_client_fixed
- pusher_client_x
* What went wrong:
A problem occurred configuring project ':pusher_client_x'.
> Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
> Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-a ... -namespace for information about setting the namespace.
If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-a ... -assistant for general information about using the AGP Upgrade Assistant.
* 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 3s
Error: Gradle task assembleDebug failed with exit code 1
Error executing devicectl: ProcessException: Process exited abnormally with exit code 3:
User cancelled
ERROR: Error writing JSON results: The file “core_device_list.json” doesn’t exist. (NSCocoaErrorDomain error 4.)
NSFilePath = /var/folders/9p/qyg46tks79g_66b7y5bk3f800000gn/T/flutter_tools.Hff1N6/core_devices.dnTZUa/core_device_list.json
----------------------------------------
The operation couldn’t be completed. No such file or directory (NSPOSIXErrorDomain error 2.)
Command: xcrun devicectl list devices --timeout 5 --json-output /var/folders/9p/qyg46tks79g_66b7y5bk3f800000gn/T/flutter_tools.Hff1N6/core_devices.dnTZUa/core_device_list.json
Подробнее здесь: https://stackoverflow.com/questions/791 ... udio-ide-c
Мобильная версия