android-plugin icon indicating copy to clipboard operation
android-plugin copied to clipboard

Integrating with sbteclipse

Open glenviewjeff opened this issue 12 years ago • 2 comments

I was wondering if you can think of any way to better integrate with the sbteclipse plugin. I tried using sbteclipse to import the default generated android-plugin project.

I deleted the test subproject from build.scala to avoid the project referencing itself error, and was able to successfully import the project into Eclipse. I can now edit and build the project from within Eclipse, but Eclipse doesn't recognize it as an Android project, so I can't deploy from within the IDE.

I also tried to connect Eclipse's Android debugger via DDMS to the running Scala application after starting it from the sbt command line. The debugger to the project and got a "no opened project found" error. I think it's because Eclipse doesn't recognize the Eclipse Scala project as an Android project.

glenviewjeff avatar Nov 11 '11 18:11 glenviewjeff

FYI, I did get Eclipse to recognize the Android project. I doubt I'll be able to build with this, but it allows connecting to the debugger.

What I did was to use the new Android project, connect to existing source, and point it to the ./src/main directory. Then Eclipse recognized the Android settings, and DDMS recognized the task as belonging to the Eclipse Android project.

I also had to reconfigure the Eclipse project's Java build path source folders by removing the src folder from the build path and adding the ./scala folder. Then I had to restart Eclipse to add breakpoints to the Scala file.

glenviewjeff avatar Nov 11 '11 19:11 glenviewjeff

I just complete setup development environment for scala with JNI Scala 2.9.1 Eclipse 3.7.1 with ScalaIDE 2.0 SBT 0.11.1 android-plugin from git://github.com/jberkel/android-plugin.git 0.6

sbteclipse is superfluous

look at https://github.com/ezh/HelloWorldAndroidJNI

PS I spent two full days hacking away, trying desperately to make it work There are a lot of hidden moments. As simplest thing - try to dex scala-library.jar ;-)

ezh avatar Dec 26 '11 15:12 ezh