mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-18 22:52:54 +08:00
fix(BuildHelper): get package name from ApplicationInfo (#1575)
This commit is contained in:
parent
5b546a27e6
commit
7efe90faac
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user