Skip to content

Commit 1e73aaf

Browse files
committed
Fix a crash if the project is using HoloEverywhere 2.0+ which no longer uses ABS
1 parent 3a84095 commit 1e73aaf

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

‎AndroidAnnotations/androidannotations/src/main/java/org/androidannotations/helper/ThirdPartyLibHelper.java‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,13 @@ public boolean usesActionBarSherlock(TypeElement typeElement) {
7070
return true;
7171
}
7272
if (qName.startsWith("org.holoeverywhere")) {
73-
/*
74-
* HoloEverywhere depends on ABS and uses its own provided
75-
* activity classes
76-
*/
77-
return true;
73+
// Since 2.0.0, HoloEverywhere no longer depends on ABS so we
74+
// had to find a way to to detect the version in classpath.
75+
// Since org.holoeverywhere.addon.AddonSherlock has been removed
76+
// during ABS to ABC migration, we're checking if this class is
77+
// in the classpath. If so, we're using HEW < 2.0
78+
// See issue #776
79+
return annotationHelper.typeElementFromQualifiedName("org.holoeverywhere.addon.AddonSherlock") != null;
7880
}
7981
}
8082
return false;

0 commit comments

Comments
 (0)