- Failed to apply plugin [id ‘com.android.internal.application’] — Android studio — Troubleshooting
- Problem
- Solution
- Conclusion
- Android Studio 4.1 Development Essentials — Kotlin Edition: Developing Android 11 Apps Using Android Studio 4.1, Kotlin and Android Jetpack (English Edition)
- See the offer
- Failed to apply plugin [id ‘com.android.application’] when react-native run-android #24501
- Comments
- DavidNeiOs commented Apr 18, 2019
- 🐛 Bug Report
- To Reproduce
- Expected Behavior
- Environment
- JKCooper2 commented Apr 20, 2019
- DavidNeiOs commented Apr 20, 2019
- JKCooper2 commented Apr 27, 2019
- stale bot commented Aug 2, 2019
- stale bot commented Aug 9, 2019
- Ошибка Gradle в Android Studio: плагин с id ‘ com.андроид.библиотека не найден
- 4 ответов
- Failed to apply plugin [id ‘com.android.internal.version-check’] #61082
- Comments
- romatallinn commented Jul 8, 2020 •
- Steps to Reproduce
- romatallinn commented Jul 8, 2020 •
- TahaTesser commented Jul 8, 2020
- romatallinn commented Jul 9, 2020 •
- Steps to Reproduce
- TahaTesser commented Jul 9, 2020 •
- shorben07 commented Jul 31, 2020
- ryanheise commented Aug 16, 2020
- iapicca commented Aug 16, 2020 •
- Issues with 1st party plugins
- Issues with 3rd party plugins
- Android Studio Gradle: ошибка: выполнение не выполнено для задачи: app: processDebugGoogleServices. > Отсутствует соответствующий клиент для пакета
Failed to apply plugin [id ‘com.android.internal.application’] — Android studio — Troubleshooting
This troubleshooting resolves the error Failed to apply plugin [id ‘com.android.internal.application’] in android studio.
We encountered a compilation error after a big update to the gradle tool. In this tutorial dedicated to troubleshooting computer errors we will try to provide the solution that worked (for us anyway) !!
Problem
While compiling your android application you find the error below:
If this is your case, the help would be much simpler than it seems.
Solution
To solve this problem just remove the script line below from the file gradle.properties
The file gradle.properties is at the root of your project. It is difficult to miss it.
Conclusion
Android Studio 4.1 Development Essentials — Kotlin Edition: Developing Android 11 Apps Using Android Studio 4.1, Kotlin and Android Jetpack (English Edition)
Completely updated for Android Studio 4.1, the goal of this book is to teach the skills necessary to develop Android-based applications using the Kotlin programming language.
Starting with the basics, this book provides an overview of the steps required to set up an Android development and testing environment, followed by an introduction to programming in Kotlin, including data types, flow control, functions. , lambdas and object oriented programming.
An overview of Android Studio is included, covering areas such as tool windows, the code editor, and the Layout Editor tool. An introduction to the architecture of Android is followed by an in-depth review of the design of Android applications and user interfaces using the Android Studio environment.
See the offer
- Do you have any stories to tell us? Go to the page Guest post to find out how to do it.
To advertise on TediDev, see the page advertising and sponsors
Источник
Failed to apply plugin [id ‘com.android.application’] when react-native run-android #24501
Comments
DavidNeiOs commented Apr 18, 2019
🐛 Bug Report
Hey I am just starting with React-Native I used the command react-native init MyProject , immediately after in the project folder I run react-native run-android and it throws the following error
I truly don’t know what to do, these are some of the files that seem to be important
Error happens in file MyProject/android/app/build.gradle
To Reproduce
- react-native init MyProject
- react-native run-android
Expected Behavior
This is the first time I am trying to run this command, I believe it should open the adroid studio emulator and show me something
Environment
The text was updated successfully, but these errors were encountered:
JKCooper2 commented Apr 20, 2019
Can you try creating the folder /Users/davidneios/.android/build-cache/3.4.0 manually and then running, or deleting it if it already exists and then running.
DavidNeiOs commented Apr 20, 2019
@JKCooper2 Thanks a lot ! that worked. I got this error next
It goes away if I run the sudo react-native run-android . is there a better solution ?
Also and sorry to bother but I cannot create an emulator using the AVD manager it throws this error
JKCooper2 commented Apr 27, 2019
Sorry not sure, maybe try asking https://www.reactiflux.com/, in any case, i don’t believe this is a react native issue.
stale bot commented Aug 2, 2019
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community’s attention? This issue may be closed if no further activity occurs. You may also label this issue as a «Discussion» or add it to the «Backlog» and I will leave it open. Thank you for your contributions.
stale bot commented Aug 9, 2019
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
Ошибка Gradle в Android Studio: плагин с id ‘ com.андроид.библиотека не найден
когда я пытаюсь построить проект библиотеки Android в Android Studio, я получаю следующую ошибку Gradle:
Я довольно новичок в Gradle и это очень запутанной для меня. Почему это происходит?
сборка.файл Gradle выглядит следующим образом:
4 ответов
ваша проблема в том, что вы используете файл верхнего уровня где вы не можете использовать такой плагин.
— вы примерно следующую структуру:
на ваш топ-уровня файл, который вы можете использовать:
в своем lib/build.gradle вы можете использовать код выложил в вопрос:
наконец-то в свой settings.gradle
также вы можете обратиться этот вопрос.
предполагая, что у вас есть стандартная структура проекта, как показано ниже:
ваш сбой синхронизации, похоже, указывает на проблему с вашей конфигурацией SDK/IDE.
начните с открытия диалогового окна » структура проекта «и убедитесь, что значение» Android SDK location: «установлено на правильный путь.
во-вторых, откройте Диспетчер SDK и снова убедитесь, что у вас установлен правильный путь к местоположению SDK.
в-третьих, убедитесь, что у вас есть правильная версия установлен пакет» Android SDK Build-Tools». (23.0.2 в данном случае)
наконец, чтобы убедиться, что у нас нет плохого состояния, я рекомендую сделать «Invalidate и Restart» из файла -> «Invalidate Caches /Restart. «
после всего этого я ожидаю, что он должен синхронизировать. Если не попытаться запустить ./gradlew из корня вашего проекта и сообщать нам о любой новой информации.
добавьте эти строки в файл gradle библиотеки.
Источник
Failed to apply plugin [id ‘com.android.internal.version-check’] #61082
Comments
romatallinn commented Jul 8, 2020 •
I am experiencing issues building an android application on flutter. The IOS app complies with no problems.
The issue seems to be along the lines of Gradle versioning for the third-party flutter plugin. However, the plugin itself shouldn’t be a problem because (I) I can import it in an empty project without issues, (II) if I remove it, then another plugin fails along the similar lines.
- flutter pub cache repair ;
- flutter pub upgrade ;
- Different versions of Gradle for the main project;
- Switched to Flutter stable channel of 1.17.4;
- Android Studio -> File -> Invalidate Cache and Restart.
The aforementioned log proposes a solution to switch Gradle version in the plugin’s project directory. However, I don’t think this would be a good idea since this directory, .pub-cache , is handled automatically by package manager and any manual change could make it only worse.
Steps to Reproduce
Not sure how to reproduce it. Have it in the full-size project. The minimal one with the specified plugin doesn’t have any issues.
The text was updated successfully, but these errors were encountered:
romatallinn commented Jul 8, 2020 •
Anticipating the answer that the problem is in the plugin, devicelocale . Might be, but when I remove it, I start getting errors like:
When I remove this plugin, the next one throws the same error.
So, I guess the initial error might be the problem of devicelocale , but this one is thrown for all the other plugins.
Dependencies in pubspec.yaml
TahaTesser commented Jul 8, 2020
If the problem persist, From what I can see, the issue is related to a 3rd party plugin devicelocale rather than to Flutter itself. Please open the issue in the dedicated repository.
Closing, as this isn’t an issue with Flutter itself.
If you disagree, please write in the comments,
providing your flutter doctor -v , your flutter run -v , your pubspec.yaml
a minimal reproducible code sample that does not use 3rd party plugins,
and I will reopen it.
Thank you
romatallinn commented Jul 9, 2020 •
The issue was indeed in the package, but not in the one Flutter was complaining about, not in devicelocale. The problem was in flutter_statusbar_manager. It is not natively migrated to AndroidX (and seems it won’t be ever; the package is abundant, @mendieta). I actually saw in the logs automatic attempt to migrate it but didn’t pay attention to it. It didn’t throw any errors, so thought it was migrated successfully.
@TahaTesser, so yes, the problem is not in flutter itself. However, I see the problem that: (I) automatic AndroidX migration of the package by flutter has failed without throwing an error (?), (II) flutter provided misleading error saying that the problem is in the different package.
Would it be worth taking a look at as a low priority issue? Or not really?
Steps to Reproduce
Empty project, pubspec.yaml should contain dependencies:
Run android, observe failure.
It seems that the second package not necessarily needs to be devicelocale, but I am just sure it fails for reproduction purposes.
TahaTesser commented Jul 9, 2020 •
i can reproduce the issue based on steps provided above but i am not able confirm if it is in fact a Flutter issue or AndroidX migration issue in Flutter or simply third package issue but @romatallinn confirmed that the. error is being reported from a wrong a package
shorben07 commented Jul 31, 2020
@romatallinn Can you please share the AndroidX error or warning message that gave you the hint what actually package to blame for the failed build?
ryanheise commented Aug 16, 2020
@iapicca (seeing that you have closed similar issues recently), what actually is the solution to this for plugin developers if the issue lies within the plugin?
The error tells you to edit the gradle-wrapper.properties file WITHIN a plugin to use a different version of Gradle, but plugin authors can’t guess what version of Gradle is needed to work with the other components of the user’s app, and it is not covered in the Flutter docs.
Is the solution to change Flutter’s plugin template so that it simply doesn’t include this file in new plugins at all? If only the app includes this file, then there won’t be a conflict, and it will be left to the app to decide what version of Gradle to use.
Looking at the official plugins, I noticed that some of them don’t include this file, so it certainly isn’t required to include it, although the plugin template puts one in there for you and pins it to a particular version of Gradle, which is I think the root cause of the issue.
iapicca commented Aug 16, 2020 •
@iapicca (seeing that you have closed similar issues recently), what actually is the solution to this for plugin developers if the issue lies within the plugin?
@ryanheise thank you for your question.
The following are not official guidelines, but my personal recommendations,
you may want to refer to @TahaTesser for the former.
The goal of flutter’s github repo is improve flutter reporting bugs, feature request and PRs,
not to provide assistance to write an app and the potential implementation of 3rd party plugins.
Issues with 1st party plugins
When a developer encounters an issue with a first party plugin (publisher: flutter.dev)
I suggest to report the issue on flutter’s github repo following the second case in the new issues page
- making sure that:
- the installed flutter version is the latest stable or above
- the app implements the latest version of the plugin
- providing:
- flutter doctor -v
- flutter run -v (or flutter run -d chrome -v for web etc)
- pubspec.yaml
- MOST IMPORTANTLY a minimal reproducible code sample (not a snippet or production code!)
- bonus [optional]:
- do use collapsible markdown
- refrain from posting screenshot of app, or terminal or IDE if not indispensable
Issues with 3rd party plugins
When a developer encounters issue with a 3rd party plugin I can recommend 2 possible approaches:
- keeping in mind the the error might very well depend from the app implementation
a developer may ask help in the appropriate channel
- follow the last case in the new issues page
- ask help on reddit or other channel listed here
- open an issue in the github repo of the 3rd party plugin that is causing the issue.
If the issue that manifests through that plugin is actually caused by flutter
should be said plugin manteiner’s responsibility to open an issue on flutter
(if a plugin doesn’t reference any github repo I recommend to stay away from it).
I’m confident that the maintainer will be glad if the reporter provides the same information
I’ve listed for a first party plugin.
I hope my answer will help you and other reporters to address possible issues in an efficient and productive manner
Источник
Android Studio Gradle: ошибка: выполнение не выполнено для задачи: app: processDebugGoogleServices. > Отсутствует соответствующий клиент для пакета
Я пытаюсь обновить свои зависимости от сервисов Google Play до 8.4.0, следуя примеру, представленному здесь Google, но я получаю следующую ошибку («com.example.exampleapp» является заменой имени моего приложения):
Модуль app / build.gradle:
Любые идеи относительно того, почему gradle не может распознать мое собственное имя пакета приложения?
РЕДАКТИРОВАТЬ:
Хорошо, на этот раз я получаю разные ошибки.
Основываясь на ссылке Shawn Thye, я добавил это к нижней части app / build.gradle:
И оставив все остальное, что я перечислил ранее, я получил эту ошибку:
И консоль Gradle:
Итак, я изменил gradle-wrapper.properties, как было запрошено «gradle-2.10-all», и получил эту ошибку:
И консоль Gradle:
Он запрашивает плагин google-services внизу файла сборки, который уже есть, и он просит меня снова запустить 8.3.0 … что я буду делать, поскольку это единственное, что работает прямо сейчас …
package_name должно соответствовать тому, что находится в вашем файле манифеста. Вы можете найти файл google-services.json если посмотреть на приведенном ниже примере.
Simpal easy В моем случае он решается следующим образом
Удостоверьтесь, что ваше имя pakage в файле mainifests совпадает с вашим именем приложения gradle.
Случилось со мной при переключении ароматов.
Теперь вы также можете использовать google-services.json с разными вкусами.
Эта же ошибка произошла со мной только тогда, когда я попытался построить свой тип сборки отладки. То, как я решил, это изменить мой google-services.json для моего типа сборки отладки. В моем исходном поле было поле client_id и значение было android:com.example.exampleapp , и я просто удалил android: префикс и ушел как com.example.exampleapp и после этого моя градиентная сборка была успешной.
РЕДАКТИРОВАТЬ
Я только что добавил android: префикс в свой google-services.json и он продолжал работать правильно. Не уверен, что произошло точно, но я смог решить мою проблему с вышеупомянутым решением.
Не найдено подходящего клиента для имени пакета com.example.exampleapp:
Вы должны получить действительный файл google-service.json для своего пакета здесь
Исправьте конфликт версии либо путем обновления версии плагина google-services (информация о последней версии доступна на странице https://bintray.com/android/android-tools/com.google.gms.google-services/ ) Или обновить версию com.google.android.gms до 8.3.0 .:
Вы должны перенести apply plugin: ‘com.google.gms.google-services’ в конец файла вашего приложения gradle.build . Что-то вроде этого:
Я сталкиваюсь с проблемой при использовании Firebase, я думаю, что другой пакет вызывает проблему.
Я решил добавить пакет нового приложения в Firebase Console и снова загрузить google-services.json.
Я нашел успех с использованием этой конфигурации:
Используя 8.40 сервисов Google Play. Alpha5 & Alpha6 дал ту же самую ошибку 2.8, что и у вас, независимо от того, был ли дистрибутив Url равным 2.10
Откройте google-services.json в студии android, мы увидим json-объект и будем содержать следующие элементы в «client» jsonarray
«Client_id»: «android: имя вашего пакета», «имя_пакета»: «имя вашего пакета»,
Проверьте свою упаковку и продолжайте.
Это случилось со мной, когда имя пакета не было представлено в файле google-services.json, который я загрузил. Откройте файл google-services.json и убедитесь, что есть объект client_info с именем пакета, которое соответствует имени вашего манифеста.
И в вашем манифесте:
Возможно, вам понадобится заново создать новый google-services.json для вашего проекта, который вы можете создать здесь: https://developers.google.com/mobile/add?platform=android&cntapi=gcm
Если это произошло с вами после переименования имени вашего пакета приложений , вам необходимо обновить следующее:
1) файл google-services.json в вашем приложении, просмотрев файл для атрибута «имя_пакета» и обновив его с новым именем пакета.
2) Обновите учетные данные клиента приложения в консоли Google Developers Console , перейдя в Credentials и выбрав свой клиентский ключ Android, а затем обновите имя пакета, а также новое.
Надеюсь, это поможет.
Ваше имя пакета google-services.json должно соответствовать вашему build.gradle applicationId (applicationId «имя вашего пакета»)
Решена проблема получения исключения
Java.lang.IllegalStateException: По умолчанию FirebaseApp не инициализируется в этом процессе. Сначала вызовите FirebaseApp.initializeApp (Context).
В FirebaseInstanceId.getInstance (). GetToken ()
Убедитесь, что имя_пакета точно совпадает с applicationId 1) build.gradle
Должен точно соответствовать 2) google-services.json
Убедитесь, что в вашем файле «google-services.json» доступно ваше имя_пакета или нет
Я думаю, потому что вы используете play-service 8.4.0
Вы также можете ссылаться на это .
Для меня мне пришлось проверить файл google-services.json и убедиться, что «package_name» правильно установлено в имя пакета моего приложения для Android. В файле автогенерированных сервисов был добавлен файл .backend в моем случае.
Это случилось со мной, когда имя пакета не было представлено в файле google-services.json, который я загрузил. Откройте файл google-services.json и убедитесь, что есть объект client_info с именем пакета, которое соответствует имени вашего манифеста.
Убедитесь, что имя пакета в манифесте проекта точно совпадает с файлом google-services.json
Добавьте это в файл проекта gradle
После изучения выше, что имя пакета в файле манифеста и идентификатор приложения в файле сборки градации должны быть одинаковыми. Моя проблема не была решена.
Фактически, ваш идентификатор приложения в файле сборки градации должен быть таким же, как имя вашего пакета в файле google-services.json. Если ваш файл google-services.json имеет другое имя пакета. Удалите это приложение из Google Analytics или консоли firebase. И получить новый файл.
Проверьте имя пакета. Это также может вызвать ошибку.
Просто студия Android запускает «Запуск от имени администратора», она будет работать
Или проверьте имя своего пакета в файле google-services.json
Оба раза, когда вы пишете имя пакета: 1. Когда вы создаете новый проект в Android Studio и 2. Когда вы создаете файл конфигурации
Источник