Ein Problem trat die Bewertung des Projekts auf ': Geolocator_android'Android

Forum für diejenigen, die für Android programmieren
Anonymous
 Ein Problem trat die Bewertung des Projekts auf ': Geolocator_android'

Post by Anonymous »

Hallo allerseits, ich bin ein Anfänger in der Flatternentwicklung. Ich möchte die Geolocator -Bibliothek verwenden, um den aktuellen Ort des Benutzers zu erhalten, aber als ich versucht habe, die App auszuführen, ist der Build -Anwendungsprozess fehlgeschlagen. Es ist < /p>
Hier sind die Details des Fehlers, mit dem ich ausgesetzt bin: < /p>

Code: Select all

1: Task failed with an exception.
-----------
* Where:
Build file 'C:AppData\Local\Pub\Cache\hosted\pub.dev\geolocator_android-4.6.2\android\build.gradle' line: 29

* What went wrong:
A problem occurred evaluating project ':geolocator_android'.
> Could not get unknown property 'flutter' for extension 'android' of type com.android.build.gradle.LibraryExtension.

2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':geolocator_android'.

> Failed to notify project evaluation listener.
> Cannot invoke method substring() on null object
> compileSdkVersion is not specified. Please add it to build.gradle

3: Task failed with an exception.
-----------
* What went wrong:
Failed to query the value of property 'buildFlowServiceProperty'.
> Could not isolate value org.jetbrains.kotlin.gradle.plugin.statistics.BuildFlowService$Parameters_Decorated@24dd914a of type BuildFlowService.Parameters
> A problem occurred configuring project ':geolocator_android'.
> Failed to notify project evaluation listener.
> Cannot invoke method substring() on null object
> compileSdkVersion is not specified. Please add it to build.gradle

< /code>
Hier ist die Konfiguration meiner App:
undroidManifest.xml






























< /code>
 build.gradle: < /p>
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.example.story_app"
compileSdk = 35
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/build/application-id.html).
applicationId = "com.example.story_app"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = 21
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
}
}
}

flutter {
source = "../.."
}
< /code>
 settings.gradle: < /p>
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.0" apply false
id "org.jetbrains.kotlin.android" version "1.9.0" apply false
}

include ":app"

< /code>
pubspec.yaml: < /p>
version: 1.0.0+1

environment:
sdk: ^3.5.4

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev.  To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
flutter:
sdk: flutter
http: ^0.13.3
fluttertoast: ^8.2.0
shared_preferences: ^2.2.3
image_picker: ^1.1.2
image: ^4.0.15
go_router: ^14.2.6
google_maps_flutter: ^2.10.0
geolocator: ^13.0.3
permission_handler: ^11.4.0

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post