【问题标题】:how to fix this error android: Could not find class 'com.owlike.genson.Genson'如何修复这个错误android:找不到类'com.owlike.genson.Genson'
【发布时间】:2018-05-17 12:09:07
【问题描述】:
final Collaborateur collaborateur =  new Genson().deserialize(scanner.nextLine(),Collaborateur.class);

05-17 12:00:20.058: E/dalvikvm(3150): 找不到类 'com.owlike.genson.Genson',引用自方法 com.example.ayit.MainActivity$2.run

【问题讨论】:

标签: android web-services jakarta-ee genson


【解决方案1】:

请查看this 以消除错误。

here 下载 jar 文件并将其添加到您的项目中。

我希望这能解决您的错误。

【讨论】:

  • 我已经下载了它并在eclipse中构建了路径,但它仍然给我这个错误
  • 你使用的是eclipse而不是android studio?
  • 如果您使用的是 Eclipse,您应该从构建路径添加 jar !使用此链接developer.com/ws/android/development-tools/…
【解决方案2】:

您需要添加您的项目 .jar 或依赖项:

<dependency>
  <groupId>com.owlike</groupId>
  <artifactId>genson</artifactId>
  <version>1.4</version>
</dependency>

【讨论】:

    猜你喜欢
    • 2017-10-08
    • 2012-11-01
    • 2019-06-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-05-31
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多