Hi,
I have an Android project which is build by Android Studio, with the
default "gradle" build system. Everything works well. Now I want to convert
the core into scala. I am using
the https://github.com/pfn/android-sdk-plugin plugin.
My project needs a 3rd party library, which is not released as a package, I
have to integrate the source code into my project. Currently, my project
directory structure looks like this:
project root
+--app
+--project
+--plugins.sbt
+--build.sbt
+--libs
+--3rd-party-lib
+--project
+--plugins.sbt
+--build.sbt
+--project
+--plugins.sbt
+--*build.scala*
+--build.sbt
The app/build.sbt looks like:
import android.Keys._
import android.Dependencies.aar
android.Plugin.androidBuild
useProguard in Android := false
platformTarget in Android := "android-19"
minSdkVersion in Android := 9
targetSdkVersion in Android := 19
name := "app"
version := "1.0"
scalaVersion := "2.10.3"
libraryDependencies ++= Seq(...)
The 3rd-party-lib/build.sbt looks like:
import android.Keys._
android.Plugin.androidBuild
platformTarget in Android := "android-19"
targetSdkVersion in Android := 19
name := "libVPI"
version := "1.0"
scalaVersion := "2.10.3"
libraryDependencies += "com.android.support" % "support-v4" % "19.1.0"
The *build.scala* looks like:
import sbt._
import Keys._
object TuTBuild extends Build {
lazy val libVPI = Project(id = "libVPI",
base = file("libs/ViewPagerIndicator"))
lazy val root = Project(id = "app",
base = file("app")) dependsOn(libVPI)
}
If I ran "sbt compile", I got:
[info] Loading project definition from
C:\Users\shend\AndroidStudioProjects\tut\project
[info] Set current project to TuT (in build
file:/C:/Users/shend/AndroidStudioProjects/tut/)
[info] Generating R.java
[info] Packaging resources: resources-debug.ap_
[info] Generating classes.dex
[info] Generating R.java
[info] classes.proguard.jar is up-to-date
[info] classes.dex is up-to-date
[info] Packaged: libVPI-debug-unaligned.apk (278.71KB)
[info] Debug package does not need signing: libVPI-debug-unaligned.apk
[info] zipaligned: libVPI-debug.apk
com.android.builder.packaging.PackagerException:
java.io.FileNotFoundException:
C:\Users\USER\AndroidStudioProjects\APP\app\target\android-bin\classes.dex
does not exist
...CALL STACK..
[error] (app/android:apkbuild)
com.android.builder.packaging.PackagerException:
java.io.FileNotFoundException:
C:\Users\USER\AndroidStudioProjects\APP\app\target\android-bin\class
And I checked the file really does not exist. I think there must be
something wrong with my build.scala file. But I have no idea how to fix.
Please help :)
Thanks,
David
--
You received this message because you are subscribed to the Google Groups
"scala-on-android" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.