diff --git a/framework/src/org/apache/cordova/BuildHelper.java b/framework/src/org/apache/cordova/BuildHelper.java index 94fe9612..2899ee2a 100644 --- a/framework/src/org/apache/cordova/BuildHelper.java +++ b/framework/src/org/apache/cordova/BuildHelper.java @@ -51,7 +51,8 @@ public class BuildHelper { { try { - Class clazz = Class.forName(ctx.getClass().getPackage().getName() + ".BuildConfig"); + String packageName = ctx.getApplicationInfo().packageName; + Class clazz = Class.forName(packageName + ".BuildConfig"); Field field = clazz.getField(key); return field.get(null); } catch (ClassNotFoundException e) {