Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Build Error #32

Open
devalp-pro opened this issue Nov 21, 2022 · 4 comments
Open

Android Build Error #32

devalp-pro opened this issue Nov 21, 2022 · 4 comments

Comments

@devalp-pro
Copy link

Android Gradle Error due to the latest version used in the project. Package contains lower grade and kotlin version that is not supported to build with latest Gradle version.


* What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.
The following dependencies do not satisfy the required version:
project ':platform_device_id' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.3.8, on Microsoft Windows [Version 10.0.22621.819], locale en-IN)
Checking Android licenses is taking an unexpectedly long time...[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[√] Chrome - develop for the web
[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2021.3)
[√] VS Code (version 1.73.1)
[√] Connected device (4 available)
[√] HTTP Host Availability

! Doctor found issues in 1 category.
@YaizukStrange
Copy link

i have the same error

@shraddha-7span
Copy link

Yes, I found same error, Please use 'device_info_plus' dependency and remove ' platform_device_id: ^1.0.1'

Use device_info_plus plugin developed by the Flutter community.

This is how you can get IDs on both platforms.

In your pubspec.yaml file add this:
dependencies:
device_info_plus: ^3.2.3

Create a method:

Future<String?> _getId() async {
var deviceInfo = DeviceInfoPlugin();
if (Platform.isIOS) { // import 'dart:io'
var iosDeviceInfo = await deviceInfo.iosInfo;
return iosDeviceInfo.identifierForVendor; // unique ID on iOS
} else if(Platform.isAndroid) {
var androidDeviceInfo = await deviceInfo.androidInfo;
return androidDeviceInfo.androidId; // unique ID on Android
}
}

@cwangfr
Copy link

cwangfr commented Jun 26, 2023

use this gradle version is ok
dependencies {
classpath 'com.android.tools.build:gradle:7.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}

@008v
Copy link

008v commented Feb 8, 2024

use this gradle version is ok dependencies { classpath 'com.android.tools.build:gradle:7.1.3' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" }

thank you . it works for me .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants