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

com.android.tools.build:gradle is no set in the build.gradle #398

Open
sswedan opened this issue Nov 26, 2024 · 0 comments
Open

com.android.tools.build:gradle is no set in the build.gradle #398

sswedan opened this issue Nov 26, 2024 · 0 comments

Comments

@sswedan
Copy link

sswedan commented Nov 26, 2024

Description
I've created a new empty Flutter app with version (3.24.5) and I'm trying to add the "com.huawei.agconnect:agcp" plugin to use Huawei Messaging. When I try to run/build for android I get the following error:

An exception occurred applying plugin request [id: 'com.huawei.agconnect']
> Failed to apply plugin 'com.huawei.agconnect'.
   > com.android.tools.build:gradle is no set in the build.gradle file

I've tried changing the Gradle Version and Kotlin version but all attempts have resulted in the same error.

Here is the Sample Flutter app to test and replicate the issue:
https://github.com/sswedan/Empty_Flutter

Expected behavior
I expect the project to build without errors

Current behavior

An exception occurred applying plugin request [id: 'com.huawei.agconnect']
> Failed to apply plugin 'com.huawei.agconnect'.
   > com.android.tools.build:gradle is no set in the build.gradle file

Screenshots

Logs
flutter build apk

[id: 'dev.flutter.flutter-plugin-loader', version: '1.0.0']
[id: 'com.android.application', version: '8.7.2', apply: false]
[id: 'org.jetbrains.kotlin.android', version: '1.7.10', apply: false]

com.huawei.agconnect.agcp
[id: 'com.huawei.agconnect.agcp', version: '1.9.1.300', artifact: 'com.huawei.agconnect:agcp:1.9.1.300', apply: false]
[id: 'com.android.application']
[id: 'kotlin-android']
[id: 'dev.flutter.flutter-gradle-plugin']
[id: 'com.huawei.agconnect']

FAILURE: Build failed with an exception.

  • Where:
    Build file 'empty_flutter\android\app\build.gradle' line: 7

  • What went wrong:
    An exception occurred applying plugin request [id: 'com.huawei.agconnect']

Failed to apply plugin 'com.huawei.agconnect'.
com.android.tools.build:gradle is no set in the build.gradle file

Environment

  • Platform: Flutter
  • Kit: Push
  • Kit Version 1.9.1.300
  • OS Version: Android 14
  • Android Studio version: 2022.2.1
  • Platform version: 3.24.5
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

1 participant