Issues with compilation against an Android-Scala Project

scala
android

#1

Has anyone else had issues compiling an Android project written in Scala with CircleCI? I can’t seem to get my build compiling, and all sorts of compilation errors get thrown - mostly related to specific Java classes and whatnot. Any thoughts or common gotchas?

Stack Trace from Container:

Building 50% > :compileDebugJavaWithJavacClass android.support.v4.widget.DrawerLayoutImpl not found - continuing with a stub.
Building 50% > :compileDebugJavaWithJavac
Building 50% > :compileDebugJavaWithJavacClass android.support.v4.app.BaseFragmentActivityHoneycomb not found - continuing with a stub.
Building 50% > :compileDebugJavaWithJavac
Building 50% > :compileDebugJavaWithJavacClass android.support.v4.app.ActivityCompatApi23 not found - continuing with a stub.
Building 50% > :compileDebugJavaWithJavac
Building 50% > :compileDebugJavaWithJavacClass android.support.v4.app.BaseFragmentActivityHoneycomb not found - continuing with a stub.
Building 50% > :compileDebugJavaWithJavac
Building 50% > :compileDebugJavaWithJavacUnable to locate class corresponding to inner class entry for RequestPermissionsRequestCodeValidator in owner android.support.v4.app.ActivityCompatApi23
Building 50% > :compileDebugJavaWithJavac
Building 50% > :compileDebugJavaWithJavac/home/ubuntu/earbits_android/src/main/scala/com/earbits/earbitsradio/activity/AlbumActivity.scala:29: illegal inheritance;
Building 50% > :compileDebugJavaWithJavac self-type com.earbits.earbitsradio.activity.AlbumActivity does not conform to SubPlayerActivity’s selftype com.earbits.earbitsradio.activity.SubPlayerActivity
Building 50% > :compileDebugJavaWithJavac
Building 50% > :compileDebugJavaWithJavacclass AlbumActivity extends SubPlayerActivity {
Building 50% > :compileDebugJavaWithJavac
Building 50% > :compileDebugJavaWithJavac ^
Building 50% > :compileDebugJavaWithJavac
Building 50% > :compileDebugJavaWithJavac/home/ubuntu/earbits_android/src/main/scala/com/earbits/earbitsradio/activity/EActivity.scala:21: not found: value findViewById
Building 50% > :compileDebugJavaWithJavac
Building 50% > :compileDebugJavaWithJavac def find[V <: View](id: Int) = findViewById(id).asInstanceOf[V]

My Circle.YML file its as so:

#general:

artifacts:

- /home/ubuntu/earbits_android/app/build/outputs/apk/

machine:
environment:
ANDROID_HOME: /usr/local/android-sdk-linux

test:
override:
- ./gradlew assemble --stacktrace --continue

dependencies:
override:
- echo y | android update sdk --no-ui --all --filter tools,platform-tools,build-tools-22.0.1,android-23,extra-google-m2repository,extra-google-google_play_services,extra-android-support
- ANDROID_HOME=/usr/local/android-sdk-linux ./gradlew dependencies


#2

Is this project open source? If so, could you paste the build URL? If not, that’s ok too. I don’t have much experience with Scala + Android but maybe we can find a simple open source project to poke around in.

Out of curiosity does the Building step ever finish?


#3