如何获得wkinterfacelabel文本?

时间:2015-08-17 09:00:12

标签: ios watchkit watchapp

watchkitWKİnterfaceLabel不受支持。

2015-08-17 10:52:48,523 [localhost-startStop-1] ERROR context.GrailsContextLoaderListener  - Error initializing the application: Error creating bean with name 'searchableMethodFactory': Cannot resolve reference to bean 'compass' while setting bean property 'compass'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'compass': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: grails/plugin/searchable/internal/compass/mapping/DefaultSearchableCompassClassMappingXmlBuilder$_buildClassMappingXml_closure1$_closure4$_closure12$_closure13
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'searchableMethodFactory': Cannot resolve reference to bean 'compass' while setting bean property 'compass'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'compass': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: grails/plugin/searchable/internal/compass/mapping/DefaultSearchableCompassClassMappingXmlBuilder$_buildClassMappingXml_closure1$_closure4$_closure12$_closure13
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'compass': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: grails/plugin/searchable/internal/compass/mapping/DefaultSearchableCompassClassMappingXmlBuilder$_buildClassMappingXml_closure1$_closure4$_closure12$_closure13
    ... 4 more
Caused by: java.lang.NoClassDefFoundError: grails/plugin/searchable/internal/compass/mapping/DefaultSearchableCompassClassMappingXmlBuilder$_buildClassMappingXml_closure1$_closure4$_closure12$_closure13
    at grails.plugin.searchable.internal.compass.mapping.DefaultSearchableCompassClassMappingXmlBuilder$_buildClassMappingXml_closure1$_closure4$_closure12.doCall(DefaultSearchableCompassClassMappingXmlBuilder.groovy:188)
    at grails.plugin.searchable.internal.compass.mapping.DefaultSearchableCompassClassMappingXmlBuilder$_buildClassMappingXml_closure1$_closure4.doCall(DefaultSearchableCompassClassMappingXmlBuilder.groovy:187)
    at grails.plugin.searchable.internal.compass.mapping.DefaultSearchableCompassClassMappingXmlBuilder$_buildClassMappingXml_closure1.doCall(DefaultSearchableCompassClassMappingXmlBuilder.groovy:72)
    at grails.plugin.searchable.internal.compass.mapping.DefaultSearchableCompassClassMappingXmlBuilder.buildClassMappingXml(DefaultSearchableCompassClassMappingXmlBuilder.groovy:65)
    at grails.plugin.searchable.internal.compass.config.mapping.SearchableClassPropertySearchableGrailsDomainClassMappingConfigurator.configureMappings(SearchableClassPropertySearchableGrailsDomainClassMappingConfigurator.java:99)
    at grails.plugin.searchable.internal.compass.config.DefaultGrailsDomainClassMappingSearchableCompassConfigurator.configure(DefaultGrailsDomainClassMappingSearchableCompassConfigurator.java:140)
    at grails.plugin.searchable.internal.compass.config.CompositeSearchableCompassConfigurator.configure(CompositeSearchableCompassConfigurator.java:39)
    at grails.plugin.searchable.internal.compass.spring.SearchableCompassFactoryBean.buildCompass(SearchableCompassFactoryBean.java:93)
    at grails.plugin.searchable.internal.compass.spring.SearchableCompassFactoryBean.getObject(SearchableCompassFactoryBean.java:58)
    at grails.plugin.searchable.internal.compass.spring.SearchableCompassFactoryBean.getObject(SearchableCompassFactoryBean.java:41)
    ... 4 more
Caused by: java.lang.ClassNotFoundException: grails.plugin.searchable.internal.compass.mapping.DefaultSearchableCompassClassMappingXmlBuilder$_buildClassMappingXml_closure1$_closure4$_closure12$_closure13
    ... 14 more
2015-08-17 10:52:48,528 [localhost-startStop-1] ERROR context.GrailsContextLoaderListener  - Error initializing Grails: Error creating bean with name 'searchableMethodFactory': Cannot resolve reference to bean 'compass' while setting bean property 'compass'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'compass': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: grails/plugin/searchable/internal/compass/mapping/DefaultSearchableCompassClassMappingXmlBuilder$_buildClassMappingXml_closure1$_closure4$_closure12$_closure13
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'searchableMethodFactory': Cannot resolve reference to bean 'compass' while setting bean property 'compass'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'compass': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: grails/plugin/searchable/internal/compass/mapping/DefaultSearchableCompassClassMappingXmlBuilder$_buildClassMappingXml_closure1$_closure4$_closure12$_closure13
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'compass': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: grails/plugin/searchable/internal/compass/mapping/DefaultSearchableCompassClassMappingXmlBuilder$_buildClassMappingXml_closure1$_closure4$_closure12$_closure13
    ... 4 more
Caused by: java.lang.NoClassDefFoundError: grails/plugin/searchable/internal/compass/mapping/DefaultSearchableCompassClassMappingXmlBuilder$_buildClassMappingXml_closure1$_closure4$_closure12$_closure13
    at grails.plugin.searchable.internal.compass.mapping.DefaultSearchableCompassClassMappingXmlBuilder$_buildClassMappingXml_closure1$_closure4$_closure12.doCall(DefaultSearchableCompassClassMappingXmlBuilder.groovy:188)
    at grails.plugin.searchable.internal.compass.mapping.DefaultSearchableCompassClassMappingXmlBuilder$_buildClassMappingXml_closure1$_closure4.doCall(DefaultSearchableCompassClassMappingXmlBuilder.groovy:187)
    at grails.plugin.searchable.internal.compass.mapping.DefaultSearchableCompassClassMappingXmlBuilder$_buildClassMappingXml_closure1.doCall(DefaultSearchableCompassClassMappingXmlBuilder.groovy:72)
    at grails.plugin.searchable.internal.compass.mapping.DefaultSearchableCompassClassMappingXmlBuilder.buildClassMappingXml(DefaultSearchableCompassClassMappingXmlBuilder.groovy:65)
    at grails.plugin.searchable.internal.compass.config.mapping.SearchableClassPropertySearchableGrailsDomainClassMappingConfigurator.configureMappings(SearchableClassPropertySearchableGrailsDomainClassMappingConfigurator.java:99)
    at grails.plugin.searchable.internal.compass.config.DefaultGrailsDomainClassMappingSearchableCompassConfigurator.configure(DefaultGrailsDomainClassMappingSearchableCompassConfigurator.java:140)
    at grails.plugin.searchable.internal.compass.config.CompositeSearchableCompassConfigurator.configure(CompositeSearchableCompassConfigurator.java:39)
    at grails.plugin.searchable.internal.compass.spring.SearchableCompassFactoryBean.buildCompass(SearchableCompassFactoryBean.java:93)
    at grails.plugin.searchable.internal.compass.spring.SearchableCompassFactoryBean.getObject(SearchableCompassFactoryBean.java:58)
    at grails.plugin.searchable.internal.compass.spring.SearchableCompassFactoryBean.getObject(SearchableCompassFactoryBean.java:41)
    ... 4 more
Caused by: java.lang.ClassNotFoundException: grails.plugin.searchable.internal.compass.mapping.DefaultSearchableCompassClassMappingXmlBuilder$_buildClassMappingXml_closure1$_closure4$_closure12$_closure13
    ... 14 more

1 个答案:

答案 0 :(得分:1)

您无法从WKInterfaceLabel检索当前文本,因为该类仅提供设置文本和颜色的方法。在将标签设置在标签上之前,您必须将文本存储在自己的字符串属性中。