2017-10-23 16 views
1

XML을 사용하여 프로젝트를 초기화하는 글루온 프로젝트를 실행 해 보았습니다. java.lang.RuntimeException가 :에 의한gluon은 IOS에서 Xpath를 지원합니까

: iOS 기기에서 응용 프로그램 실행시 다음과 같은 오류를보고는, XPathFactoryConfigurationException와 http://java.sun.com/jaxp/xpath/dom : XPathFactory를 # newInstance와 것은()를 기본 개체 모델에 대한 XPathFactory를을 작성하는 데 실패 javax.xml을 .xpath.XPathFactoryConfigurationException : http://java.sun.com/jaxp/xpath/dom javax.xml.xpath.XPathFactory.newInstance (XPathFactory.java:76

에서

참고 : 응용 프로그램은 데스크톱 윈도우/맥과 안드로이드 플랫폼에 성공적으로 실행 오브젝트 모델을 찾을 수 없습니다 XPathFactory를 구현

IOS 장치에서 Xpath가 지원되지 않습니까? 글루온

+0

적어도 프로젝트 종속성을 게시 할 수 있습니까? XPath를 호출하는 방법에 대한 간단한 코드 스 니펫도 도움이 될 것입니다. . 다음 종속성입니다 개인 정적 최종 XPath를 XPATH =를 XPathFactory.newInstance() 같이 newXPath() : –

+0

오류가 던져 // 데스크탑 SQL -> https://github.com/xerial/sqlite-jdbc desktopRuntime 'org.xerial : sqlite-jdbc : 3.8.11.2' // desktopRuntime 'com.h2database : h2 : 1.3.148' // Embedded SQL -> https://github.com/xerial/sqlite- JDBC embeddedRuntime 'org.xerial : sqlite가-JDBC : 3.7.2' 가 // 안드로이드 SQL -> https://github.com/SQLDroid/SQLDroid androidRuntime가 'org.sqldroid : sqldroid : 1.0.3' fileTree를 컴파일하십시오 (dir : 'libs', in clude : '* .jar') – Vaishnavi

답변

0

당신은 예외 읽을 수 있듯이 :

No XPathFactory implementation found for the object model: http://java.sun.com/jaxp/xpath/dom at javax.xml.xpath.XPathFactory.newInstance... 

그래서 당신이 할 필요가 유효한 구현을 제공한다. 예를 들어

, 당신의 build.gradle이 추가 :

dependencies { 
    compile 'com.gluonhq:charm:4.4.0' 
    compile 'xalan:xalan:2.7.2' 
} 

은 아마 'com.sun.org.apache:jaxp-ri:1.4' 같은 다른 사람이있다. 난 단지이 코드를 시도했습니다

:

public BasicView(String name) { 
    super(name); 

    XPath newXPath = XPathFactory.newInstance().newXPath(); 
} 

나는 더 이상 예외를하지 않습니다.

+0

고마워요! 컴파일 'xalan : xalan : 2.7.2'컴파일이 추가되었습니다. – Vaishnavi

+0

좋습니다. 이 답변을 유효한 것으로 받아들이는 것을 고려해보십시오 (왼쪽 체크). 다른 사람들에게도 유용 할 수 있습니다. –