Class Not Found Exception using custom cordova plugin

后端 未结 4 1816
旧巷少年郎
旧巷少年郎 2021-01-27 11:45

I\'m developing a printing app that uses a custom API to access the printer via USB, so I needed a custom Cordova plugin. I started developing it, it has been a very good challe

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-27 12:23

    This is the most important part of your stacktrace:

    Caused by: java.lang.ClassNotFoundException: Didn't find class "com.duplou.cordova.plugin.customprinter.CustomPrinter"
    

    Your Cordova configuration references the CustomPrinter plugin. When Javascript triggers loading it, the Java class cannot be found and thus your application crashes.

    You need to ensure that the Java class is present in your application package.

提交回复
热议问题