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

Build error: Plugin with id 'com.android.library' not found. #260

Closed
talwarabhimanyu opened this issue Feb 26, 2021 · 2 comments
Closed

Comments

@talwarabhimanyu
Copy link

talwarabhimanyu commented Feb 26, 2021

Building APK (through Android Studio) fails with the following error:

FAILURE: Build failed with an exception.

  • Where:
    Build file '/home/abhimanyu/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/agora_rtc_engine-3.2.1/android/build.gradle' line: 28

  • What went wrong:
    A problem occurred evaluating root project 'agora_rtc_engine'.

Plugin with id 'com.android.library' not found.

I have tried a few solutions from the internet: upgrading Android Gradle plugin to 4.1.0 and Gradle itself to 6.5-all, and upgrading Android Studio, but the error persists. I have seen similar issues #256 and #252 but it didn't help. Kindly indicate what I can do to resolve this.

Here is the result of flutter doctor -v

[✓] Flutter (Channel master, 1.26.0-2.0.pre.168, on Linux, locale en_CA.UTF-8)
• Flutter version 1.26.0-2.0.pre.168 at /home/abhimanyu/snap/flutter/common/flutter
• Framework revision 299e017e41 (8 weeks ago), 2021-01-03 06:29:01 -0500
• Engine revision 121b67fb85
• Dart version 2.12.0 (build 2.12.0-179.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /home/abhimanyu/Android/Sdk
• Platform android-30, build-tools 30.0.2
• Java binary at: /usr/local/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.

[✓] Chrome - develop for the web
• Chrome at google-chrome

[✓] Android Studio
• Android Studio at /usr/local/android-studio
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• android-studio-dir = /usr/local/android-studio
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.52.1)
• VS Code at /usr/share/code
• Flutter extension can be installed from:
🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (2 available)
• sdk gphone x86 arm (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 86.0.4240.183

• No issues found!

Smartphone
Android emulator Pixel 3XL API 30

@talwarabhimanyu
Copy link
Author

It turns out I had made a silly error while migrating to AndroidX. In android/app/src/build.gradle, instead of androidx.test:runner:1.1.1 I had androidx.test.runner:1.1.1 (instead of : after test, I had .).

After making that change, the build worked fine. Sorry for the trouble!

@github-actions
Copy link
Contributor

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please raise a new issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant