use of org.androidannotations.internal.exception.RClassNotFoundException in project androidannotations by androidannotations.
the class AndroidRClassFinder method find.
public IRClass find() throws RClassNotFoundException {
Elements elementUtils = processingEnv.getElementUtils();
TypeElement androidRType = elementUtils.getTypeElement("android.R");
if (androidRType == null) {
LOGGER.error("The android.R class cannot be found");
throw new RClassNotFoundException("The android.R class cannot be found");
}
LOGGER.info("Found Android class: {}", androidRType.toString());
return new RClass(androidRType);
}
use of org.androidannotations.internal.exception.RClassNotFoundException in project androidannotations by androidannotations.
the class ProjectRClassFinder method find.
public IRClass find(AndroidManifest manifest) throws RClassNotFoundException {
Elements elementUtils = environment.getProcessingEnvironment().getElementUtils();
String rClass = getRClassPackageName(manifest) + ".R";
TypeElement rType = elementUtils.getTypeElement(rClass);
if (rType == null) {
LOGGER.error("The generated {} class cannot be found", rClass);
throw new RClassNotFoundException("The generated " + rClass + " class cannot be found");
}
LOGGER.info("Found project R class: {}", rType.toString());
return new RClass(rType);
}
Aggregations