【问题标题】:Why does Play build report error: package org.json does not exist with chargebee-1.0 in build.sbt?为什么 Play build 报错:package org.json does not exist with chargebee-1.0 in build.sbt?
【发布时间】:2014-10-16 15:40:36
【问题描述】:

我正在尝试 import org.json 到我的 Play Framework 项目,但无法摆脱此错误消息:

错误:包 org.json 不存在

使用 Eclipse,我已将 org.json-chargebee-1.0.jar 添加到 Java 构建路径中,build.sbt 文件如下所示:

name := "sorlandsportalen"

version := "1.0-SNAPSHOT"

libraryDependencies ++= Seq(
      javaJdbc,
      javaEbean,
      cache,
      "mysql" % "mysql-connector-java" % "5.1.26",
      "org.hibernate" % "hibernate-entitymanager" % "4.3.1.Final",
      "org.json"%"org.json"%"chargebee-1.0"     
      )

play.Project.playJavaSettings

我使用的是 Play Framework 2.2.1 版

【问题讨论】:

  • 你跑play update了吗?

标签: java json eclipse playframework-2.2


【解决方案1】:

build.sbt 中将依赖项"org.json" % "org.json" % "chargebee-1.0" 添加到项目的构建(定义)后,在项目目录中执行play eclipse

刷新 Eclipse,问题应该会消失(因为 build.sbt 看起来不错,我自己测试过)。

【讨论】:

    猜你喜欢
    • 2021-10-01
    • 2021-10-09
    • 1970-01-01
    • 2017-06-07
    • 2023-01-12
    • 2023-02-23
    • 1970-01-01
    • 2023-01-31
    • 2022-11-12
    相关资源
    最近更新 更多