1
我用wurfl檢測手機上的設備。 我初始化GeneralWURFLEngine但它不能初始化不要初始化GeneralWURFLEngine
我的代碼:
public static final String path = "wurfl.zip";
private static ThreadLocal<WURFLEngine> wulEngine = new ThreadLocal<WURFLEngine>() {
protected WURFLEngine initialValue() {
return new GeneralWURFLEngine(path);
};
};
Device device = wulEngine.get()
.getDeviceForRequest(userAgentString);
錯誤:
ERROR core.GeneralWURFLEngine (GeneralWURFLEngine.java:274) - cannot initialize: net.sourceforge.wurfl.core.resource.exc.WURFLResourceException: WURFL unexpected exception
net.sourceforge.wurfl.core.resource.exc.WURFLResourceException: WURFL unexpected exception
at net.sourceforge.wurfl.core.resource.XMLResource.readData(XMLResource.java:350)
at net.sourceforge.wurfl.core.resource.XMLResource.getData(XMLResource.java:154)
at net.sourceforge.wurfl.core.resource.DefaultWURFLModel.init(DefaultWURFLModel.java:118)
at net.sourceforge.wurfl.core.resource.DefaultWURFLModel.<init>(DefaultWURFLModel.java:110)
at net.sourceforge.wurfl.core.GeneralWURFLEngine.init(GeneralWURFLEngine.java:293)
at net.sourceforge.wurfl.core.GeneralWURFLEngine.initIfNeeded(GeneralWURFLEngine.java:272)
at net.sourceforge.wurfl.core.GeneralWURFLEngine.getDeviceForRequest(GeneralWURFLEngine.java:41
如何我可以修復的bug?感謝您的幫助