LoginSignup
u_i_vs_world
@u_i_vs_world (大夢)

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

【 PlayFramework 】 The import play cannot be resolved を解決したい

解決したいこと

$ sbt new playframework/play-java-seed.g8で Java Play プロジェクトを新規作成した段階で、下記の画像のようなエラーが出ます。
image.png
$ sbt runで実行して localhost:9000 に繋ぐと「Welcome to Play!」と表示されているのですが、あまりウェルカムな気がしません。

何故このようなエラーが初期状態で表示されるのか、わかる方いらっしゃったら是非ご教示いただきたいです。

環境

  • VSCode
  • Play 2.8.5
  • Sbt 1.3.13
  • Giter8 0.11.0
  • ScalaVersion 2.13.3

該当するソースコード

HomeController.java
package controllers;

import play.mvc.*;

/**
 * This controller contains an action to handle HTTP requests
 * to the application's home page.
 */
public class HomeController extends Controller {

    /**
     * An action that renders an HTML page with a welcome message.
     * The configuration in the <code>routes</code> file means that
     * this method will be called when the application receives a
     * <code>GET</code> request with a path of <code>/</code>.
     */
    public Result index() {
        return ok(views.html.index.render());
    }

}
0

No Answers yet.

Your answer might help someone💌