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.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have added it to the app module, and this error appears after clicking sync.
The text was updated successfully, but these errors were encountered:
StephenChow-beep
changed the title
Failed to add plugin
The strings placeholder resolver can only be applied to projects of type 'com.android.application'
Jul 9, 2024
Thank you for your feedback. I've just tried it out but couldn't reproduce the issue. I'm usind AGP version: 8.5.1. The only reasons I could think of that might cause this issue would be:
There might be an apply plugin: somewhere to add Stem using the "legacy" apply method mechanism.
There might be a specific AGP version that causes this issue.
So as a follow-up I'd like to confirm if the "legacy" apply method is not happening in your project, and also I'd like to check what's the AGP version that you're using.
I think the fault with @StephenChow-beep is that it also uses id("com.likethesalad.stem") version "2.9.0" in the build.gradle file in the root directory. This error is because when we define the plugin in the build.gradle file in the root directory, we don't apply android plugin immediately, like id("com.android.application") version "8.1.0" apply false. At this time, when the plugin is loaded, it will be verified and failed, and the specific code is implemented inBaseTemplatesProcessorPlugin.kt#L36
Remove the plugin definition from the root directory and add id("com.likethesalad.stem") version "2.9.0" directly under the app module.
// build.gradle(.kts) in root projectplugins {
··· emit ···
id("com.likethesalad.stem") version "2.9.0"// remove this
}
In the traditional way, in the build.gradle directory of the root directory, use apply false, and then remove the version of the plugin under the app module and use it only id("com.likethesalad.stem")
// build.gradle(.kts) in root projectplugins {
··· emit ···
id("com.likethesalad.stem") version "2.9.0" apply false// add `apply false`
}
I have added it to the app module, and this error appears after clicking sync.
The text was updated successfully, but these errors were encountered: