本地目录中CodenameOne

问题描述:

我使用TTS就像在DrSbaitso演示中CodenameOne使用NetBeans unfound, 创建后TTS.java接口
`进口com.codename1.system.NativeInterface;本地目录中CodenameOne

公共接口TTS延伸NativeInterface { 公共无效说(字符串文本); } when I click on "Generate native Access" , I got the dialog "native interfaces generated : see the 'native'directory in the project. Unless i can't find the native directory in my project , and the compiler keep the error java.lang.ClassNotFoundException:com.mycompany.myapp.TTSImpl`。任何想法 ?

的目录是在项目目录下,但NetBeans的不只是在Files视图常规视图显示它。

你需要做一个完整的“建”一次,一旦你这样做运行时,该项目应该找到实现类。

+0

完整版本没有为我解决问题。找不到类TTSImpl。 – pollaris

+0

在模拟器中?设备?如果这在IDE的模拟器中出现问题,IDE中的类路径如何查看?注意模拟器并不是什么大问题,因为它只是运行JavaSE存根,你应该能够通过检查本地接口实例是否为空来正确处理这种情况(其中impl不存在)。 –

+0

当我实现TTSimpl时,如何解决导入android.speech.tts.TextToSpeech;为了构建到android? – pollaris