Play framework - the package does not exist in the new project

I am trying to compile a newly created Play Framework application. I followed the instructions and generated an application with a play-java template and called it a test. Change to the "test" directory, run the .bat activator and type "compile". It shows:

Z:\aaa\activator-1.2.10\test>activator.bat
[info] Loading project definition from Z:\aaa\activator-1.2.10\test\project
[info] Set current project to test (in build file:/Z:/aaa/activator-1.2.10/test/)
[test] $ compile
[info] Compiling 4 Scala sources and 2 Java sources to Z:\aaa\activator-1.2.10\test\target\scala-2.11\classes...
[error] Z:\aaa\activator-1.2.10\test\app\controllers\Application.java:3: error: package play does not exist
[error] import play.*;
[error] ^
[error] Z:\aaa\activator-1.2.10\test\app\controllers\Application.java:4: error: package play.mvc does not exist
[error] import play.mvc.*;
[error] ^
[error] Z:\aaa\activator-1.2.10\test\app\controllers\Application.java:8: error: cannot find symbol
[error] public class Application extends Controller {
[error]                                  ^
[error]   symbol: class Controller
[error] Z:\aaa\activator-1.2.10\test\app\controllers\Application.java:10: error: cannot find symbol
[error]     public static Result index() {
[error]                   ^
[error]   symbol:   class Result
[error]   location: class Application
[error] Z:\aaa\activator-1.2.10\test\target\scala-2.11\classes\controllers\ReverseAssets.class: warning: Cannot find annotation method 'bytes()' in type 'ScalaS
ignature': class file for scala.reflect.ScalaSignature not found
[error] Z:\aaa\activator-1.2.10\test\target\scala-2.11\classes\controllers\ReverseApplication.class: warning: Cannot find annotation method 'bytes()' in type 'S
calaSignature'
[error] Z:\aaa\activator-1.2.10\test\target\scala-2.11\classes\controllers\javascript\ReverseAssets.class: warning: Cannot find annotation method 'bytes()' in t
ype 'ScalaSignature'
[error] Z:\aaa\activator-1.2.10\test\target\scala-2.11\classes\controllers\javascript\ReverseApplication.class: warning: Cannot find annotation method 'bytes()'
 in type 'ScalaSignature'
[error] Z:\aaa\activator-1.2.10\test\target\scala-2.11\classes\controllers\ref\ReverseAssets.class: warning: Cannot find annotation method 'bytes()' in type 'Sc
alaSignature'
[error] Z:\aaa\activator-1.2.10\test\target\scala-2.11\classes\controllers\ref\ReverseApplication.class: warning: Cannot find annotation method 'bytes()' in typ
e 'ScalaSignature'
[error] Z:\aaa\activator-1.2.10\test\target\scala-2.11\classes\views\html\index.class: warning: Cannot find annotation method 'bytes()' in type 'ScalaSignature'

[error] Z:\aaa\activator-1.2.10\test\app\controllers\Application.java:11: error: cannot access Html
[error]         return ok(index.render("Your new application is ready."));
[error]                  ^
[error]   class file for play.twirl.api.Html not found
[error] 5 errors
[error] 7 warnings
[error] (compile:compile) javac returned nonzero exit code
[error] Total time: 7 s, completed 2014-08-24 17:29:48

      

I am using Windows 8. Thanks in advance.

Edit: I was able to run 2.2 without any problem, only 2.3 doesn't see the game. *

+3


source to share


1 answer


You don't need to go into a subdirectory.

The activator or SBT must run from the directory where the file is located build.sbt

(parent directory containing subdirectories app

and test

).



After activating Activator / SBT, tests can be compiled and executed using a task test

.

+1


source







All Articles