forked from github/cordova-android
write error to log when plugins.xml is missing
This commit is contained in:
parent
6d532c9fe5
commit
3de2084af2
@ -50,6 +50,7 @@ public final class PluginManager {
|
|||||||
*/
|
*/
|
||||||
public void loadPlugins() {
|
public void loadPlugins() {
|
||||||
int id = ctx.getResources().getIdentifier("plugins", "xml", ctx.getPackageName());
|
int id = ctx.getResources().getIdentifier("plugins", "xml", ctx.getPackageName());
|
||||||
|
if (id == 0) { pluginConfigurationMissing(); }
|
||||||
XmlResourceParser xml = ctx.getResources().getXml(id);
|
XmlResourceParser xml = ctx.getResources().getXml(id);
|
||||||
int eventType = -1;
|
int eventType = -1;
|
||||||
while (eventType != XmlResourceParser.END_DOCUMENT) {
|
while (eventType != XmlResourceParser.END_DOCUMENT) {
|
||||||
@ -297,4 +298,11 @@ public final class PluginManager {
|
|||||||
plugin.onNewIntent(intent);
|
plugin.onNewIntent(intent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void pluginConfigurationMissing() {
|
||||||
|
System.err.println("=====================================================================================");
|
||||||
|
System.err.println("ERROR: plugin.xml is missing. Add res/xml/plugins.xml to your project.");
|
||||||
|
System.err.println("https://raw.github.com/phonegap/phonegap-android/master/framework/res/xml/plugins.xml");
|
||||||
|
System.err.println("=====================================================================================");
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user