SetManifestPlaceHolder Problem


I have developed an IntelliJ plugin (Android Studio plugin) that has been working fine but after I update my Gradle to the final version, I got an error on the setManifestPlaceholder that returns no such method Error. I enclosed the code, which I am using to inspect the build.Gradle file.


Module[] modules = ModuleManager.getInstance(myProject).getSortedModules();
Module module = modules[modules.length-2];
GradleBuildModel model = GradleBuildModel.get(module);
assert model != null;
AndroidModel androidModel =;
if (GenerateClassAuthentication.getInstance().isHasCustom()){

String cutomUrl = GenerateClassAuthentication.getInstance().getCustomURL();
if (cutomUrl.contains(":") && androidModel!=null){
cutomUrl = cutomUrl.substring(0, cutomUrl.indexOf(":"));
}else {
cutomUrl = cutomUrl.substring(0, cutomUrl.indexOf("/"));
assert androidModel != null;
androidModel.defaultConfig().setManifestPlaceholder("test", cutomUrl);
}else {
assert androidModel != null;


Thanks in advance for your help

1 comment

based on the error that I found in the Android Studio, the main cause of this problem can be from this imported line: 

import static;

but as I checked it contains all of the functions that I used, so I don't understand why I got the error in the Android Studio.


Please sign in to leave a comment.