mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-22 00:32:55 +08:00
Merge pull request #161 from don/master
Write error to log when plugins.xml is missing
This commit is contained in:
commit
4af8952dc3
@ -1,4 +1,4 @@
|
|||||||
<!--?xml version="1.0" encoding="utf-8"?-->
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin name="App" value="com.phonegap.App"/>
|
<plugin name="App" value="com.phonegap.App"/>
|
||||||
<plugin name="Geolocation" value="com.phonegap.GeoBroker"/>
|
<plugin name="Geolocation" value="com.phonegap.GeoBroker"/>
|
||||||
|
@ -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