Giter VIP home page Giter VIP logo

hello-scaloid-sbt's People

Contributors

awwaiid avatar blast-hardcheese avatar krishnapal-rajput avatar pocorall avatar realakhmed avatar wookietreiber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hello-scaloid-sbt's Issues

Running error in Idea

First time project runs perfect. After removing something (e.g. call of fill method on SEditText), re-running app, reverting changes and running again I'm getting following error:

01-21 13:14:39.952    1447-1447/scaloid.example E/AndroidRuntime﹕ FATAL EXCEPTION: main
    java.lang.NoSuchMethodError: org.scaloid.common.SEditText.fill
            at scaloid.example.HelloScaloid$$anonfun$2$$anon$1.<init>(HelloScaloid.scala:22)
            at scaloid.example.HelloScaloid$$anonfun$2.apply(HelloScaloid.scala:9)
            at scaloid.example.HelloScaloid$$anonfun$2.apply(HelloScaloid.scala:9)
            at org.scaloid.common.SActivity$$anonfun$onCreate$1.apply(app.scala:130)
            at org.scaloid.common.SActivity$$anonfun$onCreate$1.apply(app.scala:130)
            at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
            at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
            at org.scaloid.common.SActivity$class.onCreate(app.scala:130)
            at scaloid.example.HelloScaloid.onCreate(HelloScaloid.scala:6)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
            at android.app.ActivityThread.access$1500(ActivityThread.java:117)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:130)
            at android.app.ActivityThread.main(ActivityThread.java:3683)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:507)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
            at dalvik.system.NativeStart.main(Native Method)

To workaround this I added one more "before launch" line to run configuration with sbt clean task. "sbt ~run" from the console works correctly.

newer android tools results in "can't find zipalign"

Trying to build with new android tools results in the following error:
scala-android/sbt-android#70

Simple fix is to use a newer android-sdk-plugin:

index 85b482d..7b99f24 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -1,4 +1,4 @@
-addSbtPlugin("com.hanhuy.sbt" % "android-sdk-plugin" % "1.3.6")
+addSbtPlugin("com.hanhuy.sbt" % "android-sdk-plugin" % "1.3.10")

Erros when importing project in Eclipse

I could work on the project through sbt, I also issued eclipse or eclipse -with-source=true commands before going to Eclipse to import the project. On importing it showed these problems:
/hello-scaloid-sbt/gen already exists but is not a source folder. Convert to asource folder or rename it.
Error in scala compiler object scala.runtime in compiler mirror not found
Sbt builder crashed while compiling. The error message is object scala.runtime in compiler mirror not found
Before that it also gave message of duplicate entries src in .path
I am using current eclipse, scalaide and adt versions. This is my first attempt at familiarizing scaloid. Could I know where am I going wrong? Thanks. Ramesh,

Run app error

c:\MyProjects\hello-scaloid-sbt-master>sbt run
[info] Loading project definition from C:\MyProjects\hello-scaloid-sbt-master\pr
oject
[info] Set current project to hello-scaloid-sbt (in build file:/C:/MyProjects/he
llo-scaloid-sbt-master/)
[info] Processing resources
[info] Compiling 2 Scala sources and 2 Java sources to C:\MyProjects\hello-scalo
id-sbt-master\bin\classes...
[warn] UPDATE: A newer android-sdk-plugin is available: 1.4.0, currently running
: 1.3.23
java.lang.IllegalArgumentException: invalid source release: 1.7
at com.sun.tools.javac.main.RecognizedOptions$GrumpyHelper.error(Recogni
zedOptions.java:75)
at com.sun.tools.javac.main.RecognizedOptions$13.process(RecognizedOptio
ns.java:370)
at com.sun.tools.javac.api.JavacTool.processOptions(JavacTool.java:247)
at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:207)
at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:53)
at sbt.compiler.javac.LocalJavaCompiler.run(LocalJava.scala:69)
at sbt.compiler.javac.JavaCompilerAdapter.compileWithReporter(JavaCompil
erAdapter.scala:31)
at sbt.compiler.javac.AnalyzingJavaCompiler$$anonfun$compile$1.apply$mcV
$sp(AnalyzingJavaCompiler.scala:65)
at sbt.compiler.javac.AnalyzingJavaCompiler$$anonfun$compile$1.apply(Ana
lyzingJavaCompiler.scala:65)
at sbt.compiler.javac.AnalyzingJavaCompiler$$anonfun$compile$1.apply(Ana
lyzingJavaCompiler.scala:65)
at sbt.compiler.javac.AnalyzingJavaCompiler.timed(AnalyzingJavaCompiler.
scala:93)
at sbt.compiler.javac.AnalyzingJavaCompiler.compile(AnalyzingJavaCompile
r.scala:64)
at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileJava$1$1.apply$mc
V$sp(MixedAnalyzingCompiler.scala:61)
at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileJava$1$1.apply(Mi
xedAnalyzingCompiler.scala:61)
at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileJava$1$1.apply(Mi
xedAnalyzingCompiler.scala:61)
at sbt.compiler.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scal
a:75)
at sbt.compiler.MixedAnalyzingCompiler.compileJava$1(MixedAnalyzingCompi
ler.scala:60)
at sbt.compiler.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.sc
ala:65)
at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.
scala:160)
at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.
scala:160)
at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:6
6)
at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:6
4)
at sbt.inc.IncrementalCommon.cycle(IncrementalCommon.scala:31)
at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:62)
at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:61)
at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:89)
at sbt.inc.Incremental$.compile(Incremental.scala:61)
at sbt.inc.IncrementalCompile$.apply(Compile.scala:54)
at sbt.compiler.IC$.compileInternal(IncrementalCompiler.scala:160)
at sbt.compiler.IC$.incrementalCompile(IncrementalCompiler.scala:138)
at sbt.Compiler$.compile(Compiler.scala:128)
at sbt.Compiler$.compile(Compiler.scala:114)
at sbt.Defaults$.sbt$Defaults$$compileIncrementalTaskImpl(Defaults.scala
:814)
at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:8
05)
at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:8
03)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:22
6)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:22
6)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:235)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestric
tions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:44
1)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
at java.lang.Thread.run(Thread.java:662)
error java.lang.IllegalArgumentException: invalid
source release: 1.7
[error] Total time: 9 s, completed 09.06.2015 22:37:30

Please add a license file to the repo

The repo currently does not specify a license, so most likely, it defaults to copyrighted with "All Rights Reserved", which means users cannot fork, modify, or distribute the repo.

Please add a LICENSE.txt to the root of the repo. If this is intended to be Apache-licensed, you can use the Apache 2.0 license straight from the source.

Thanks!

Run andropid app issue

Hi guys!
I have made everything correct to import project. In read me there is:
"Edit the generated run configuration. Remove the 'Before launch: Make' then add a new SBT command android:package-debug then tab out or it will not save, then click OK then OK."
I have modified run configs of Android app, SBT app, Scala sript - what to modify exactly because with Android app launch I have problem:
Exception: Lint must be invoked with the System property com.android.tools.lint.bindir pointing to the ANDROID_SDK tools directory
So I am only able to run and debug app in IDEA with ~run command.
Is there any way to set up run of android app from inside IDEA?

Cannot get code compiled in IntelliJ IDEA 13.1.3

I've cloned the source into my project folder, run the command sbt genidea, and then imported them into IntelliJ IDEA successfully.

However, when I hit the compile or run button in IntelliJ IDEA, there will be an error message telling me:

Error:scalac: Error: Could not find an output directory for /home/izzy/.IntelliJIdea13/system/compile-server/hello-scaloid-sbt_fd8e7aa8/targets/java-production/hello-scaloid-sbt/android/copied_sources/scaloid/example/TR.scala in List((/home/izzy/Dropbox/Scala/hello-scaloid-sbt/gen,/home/izzy/Dropbox/Scala/hello-scaloid-sbt/bin/classes), (/home/izzy/Dropbox/Scala/hello-scaloid-sbt/res,/home/izzy/Dropbox/Scala/hello-scaloid-sbt/bin/classes), (/home/izzy/Dropbox/Scala/hello-scaloid-sbt/src,/home/izzy/Dropbox/Scala/hello-scaloid-sbt/bin/classes))
scala.reflect.internal.FatalError: Could not find an output directory for /home/izzy/.IntelliJIdea13/system/compile-server/hello-scaloid-sbt_fd8e7aa8/targets/java-production/hello-scaloid-sbt/android/copied_sources/scaloid/example/TR.scala in List((/home/izzy/Dropbox/Scala/hello-scaloid-sbt/gen,/home/izzy/Dropbox/Scala/hello-scaloid-sbt/bin/classes), (/home/izzy/Dropbox/Scala/hello-scaloid-sbt/res,/home/izzy/Dropbox/Scala/hello-scaloid-sbt/bin/classes), (/home/izzy/Dropbox/Scala/hello-scaloid-sbt/src,/home/izzy/Dropbox/Scala/hello-scaloid-sbt/bin/classes))
    at scala.tools.nsc.settings.MutableSettings$OutputDirs.outputDirFor(MutableSettings.scala:295)
    at scala.tools.nsc.backend.jvm.BytecodeWriters$class.outputDirectory(BytecodeWriters.scala:26)
    at scala.tools.nsc.backend.jvm.GenASM.outputDirectory(GenASM.scala:23)
    at scala.tools.nsc.backend.jvm.BytecodeWriters$class.getFile(BytecodeWriters.scala:41)
    at scala.tools.nsc.backend.jvm.GenASM.getFile(GenASM.scala:23)
    at scala.tools.nsc.backend.jvm.GenASM$JBuilder.writeIfNotTooBig(GenASM.scala:468)
    at scala.tools.nsc.backend.jvm.GenASM$JMirrorBuilder.genMirrorClass(GenASM.scala:2811)
    at scala.tools.nsc.backend.jvm.GenASM$AsmPhase.emitFor$1(GenASM.scala:131)
    at scala.tools.nsc.backend.jvm.GenASM$AsmPhase.run(GenASM.scala:141)
    at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1625)
    at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1610)
    at scala.tools.nsc.Global$Run.compileSources(Global.scala:1605)
    at scala.tools.nsc.Global$Run.compile(Global.scala:1703)
    at xsbt.CachedCompiler0.run(CompilerInterface.scala:126)
    at xsbt.CachedCompiler0.run(CompilerInterface.scala:102)
    at xsbt.CompilerInterface.run(CompilerInterface.scala:27)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:102)
    at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:48)
    at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
    at org.jetbrains.jps.incremental.scala.local.IdeaIncrementalCompiler.compile(IdeaIncrementalCompiler.scala:28)
    at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:25)
    at org.jetbrains.jps.incremental.scala.remote.Main$.make(Main.scala:64)
    at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:22)
    at org.jetbrains.jps.incremental.scala.remote.Main.nailMain(Main.scala)
    at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)

I think the problem may be caused by TR.scala, and IntelliJ IDEA doesn't known how to find this file.

Nevertheless, I can compile and run the code in command line by using sbt android:package and sbt android:run. But I wonder if I can fix this problem and get everything done in IntelliJ IDEA.

Thanks,
Izzy Leung

HelloScaloid is already defined as class HelloScaloid

Having this compilation issue in Idea.

Error:(6, 7) HelloScaloid is already defined as class HelloScaloid
class HelloScaloid extends SActivity {
      ^

I'm using Android SDK 23.
I've tried sbt clean, but it didn't help.

Compile error with IntelliJ 14 / Android SDK 21

I get a Progaurd-related dependency warning upon importing and a ridiculously low-level compile error upon trying to compile or run. Two of my coworkers with similar stacks reproduced the error with the same error message and stack trace.

My specific steps were as follows:

  • cloned the project repo to a local folder
  • ran android update project -p . in the project root
  • imported the project into IntelliJ
  • got dependency warning (pasted below)
  • changed before-launch setting as per instructions
  • double checked JDK & project SDK settings
  • tried to compile
  • got compile error (pasted below)

(Incidentally, I can compile successfully and generate a working .adk by running sbt android:package from the project root.)

I am running:

  • OS X 10.0
  • JDK 1.7.0_71
  • Scala 2.11.4
  • SBT 0.13
  • IntelliJ 14.0.2 with:
    • Scala plugin 1.2.1
    • SBT plugin 1.6.1
  • Android SDK at API level 21, with the following installed:
    • Android SDK Tools 24.0.2
    • Android SDK Platform-tools 21
    • Android SDK Build-tools 21.1.2

When I import the project, I get the following warnings:

4:48:18 PM SBT project import
           [warn] There may be incompatibilities among your library dependencies.
           [warn] Here are some of the libraries that were evicted:
           [warn]     * net.sf.proguard:proguard-base:4.11 -> 5.0
           [warn] Run 'evicted' to see detailed eviction warnings

When I try to compile I get the following error message and stack trace:

Information:1/5/15, 4:50 PM - Compilation completed with 2 errors and 0 warnings in 2 sec

Error:scalac: error while loading Object, Missing dependency 'object scala in compiler mirror', required by /Users/aguestuser/Library/Android/sdk/platforms/android-21/android.jar(java/lang/Object.class)

Error:scalac: Error: object scala in compiler mirror not found.
scala.reflect.internal.MissingRequirementError: object scala in compiler mirror not found.
    at scala.reflect.internal.MissingRequirementError$.signal(MissingRequirementError.scala:17)
    at scala.reflect.internal.MissingRequirementError$.notFound(MissingRequirementError.scala:18)
    at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:53)
    at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:66)
    at scala.reflect.internal.Mirrors$RootsBase.getPackage(Mirrors.scala:173)
    at scala.reflect.internal.Definitions$DefinitionsClass.ScalaPackage$lzycompute(Definitions.scala:161)
    at scala.reflect.internal.Definitions$DefinitionsClass.ScalaPackage(Definitions.scala:161)
    at scala.reflect.internal.Definitions$DefinitionsClass.ScalaPackageClass$lzycompute(Definitions.scala:162)
    at scala.reflect.internal.Definitions$DefinitionsClass.ScalaPackageClass(Definitions.scala:162)
    at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1388)
    at scala.tools.nsc.Global$Run.<init>(Global.scala:1053)
    at xsbt.CachedCompiler0$$anon$2.<init>(CompilerInterface.scala:116)
    at xsbt.CachedCompiler0.run(CompilerInterface.scala:116)
    at xsbt.CachedCompiler0.run(CompilerInterface.scala:102)
    at xsbt.CompilerInterface.run(CompilerInterface.scala:27)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:102)
    at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:48)
    at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
    at org.jetbrains.jps.incremental.scala.local.IdeaIncrementalCompiler.compile(IdeaIncrementalCompiler.scala:29)
    at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:26)
    at org.jetbrains.jps.incremental.scala.remote.Main$.make(Main.scala:62)
    at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:20)
    at org.jetbrains.jps.incremental.scala.remote.Main.nailMain(Main.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)

This is what my build.sbt file looks like:

import android.Keys._

android.Plugin.androidBuild

name := "hello-scaloid-sbt"

scalaVersion := "2.11.4"

proguardCache in Android ++= Seq(
                                 ProguardCache("org.scaloid") % "org.scaloid"
                                              )

proguardOptions in Android ++= Seq("-dontobfuscate", "-dontoptimize", "-keepattributes Signature", "-printseeds target/seeds.txt", "-printusage target/usage.txt"
                                   , "-dontwarn scala.collection.**" // required from Scala 2.11.4
                                     )

libraryDependencies += "org.scaloid" %% "scaloid" % "3.6.1-10" withSources() withJavadoc()

scalacOptions in Compile += "-feature"

run <<= run in Android

install <<= install in Android

This is what my progaurd.sbt.txt file looks like:

# This is a configuration file for ProGuard.
# http://proguard.sourceforge.net/index.html#manual/usage.html

-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-verbose

# Optimization is turned off by default. Dex does not like code run
# through the ProGuard optimize and preverify steps (and performs some
# of these optimizations on its own).
-dontoptimize
-dontpreverify
# Note that if you want to enable optimization, you cannot just
# include optimization flags in your own project configuration file;
# instead you will need to point to the
# "proguard-android-optimize.txt" file instead of this one from your
# project.properties file.

-keepattributes *Annotation*
-keep public class com.google.vending.licensing.ILicensingService
-keep public class com.android.vending.licensing.ILicensingService

# For native methods, see http://proguard.sourceforge.net/manual/examples.html#native
-keepclasseswithmembernames class * {
    native <methods>;
}

# keep setters in Views so that animations can still work.
# see http://proguard.sourceforge.net/manual/examples.html#beans
-keepclassmembers public class * extends android.view.View {
   void set*(***);
   *** get*();
}

# We want to keep methods in Activity that could be used in the XML attribute onClick
-keepclassmembers class * extends android.app.Activity {
   public void *(android.view.View);
}

# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
-keepclassmembers enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}

-keep class * implements android.os.Parcelable {
  public static final android.os.Parcelable$Creator *;
}

-keepclassmembers class **.R$* {
    public static <fields>;
}

# The support library contains references to newer platform versions.
# Don't warn about those in case this app is linking against an older
# platform version.  We know about them, and they are safe.
-dontwarn android.support.**

Errors in generated eclipse project using scala-ide

When I generate an eclipse project from SBT with "eclipse", I get several errors in Scala IDE 4.0 when I import it:

  • Cannot nest output folder 'hello-scaloid-sbt/bin/classes' inside output folder 'hello-scaloid-sbt/bin'
  • Error in Scala compiler: object scala.runtime in compiler mirror not found.
  • error while loading Object, Missing dependency 'class scala.throws in compiler mirror', required by /Users/trepidacious/android/adt-bundle-mac-x86_64-20140702/sdk/platforms/android-10/android.jar(java/lang/Object.class)
  • SBT builder crashed while compiling. The error message is 'object scala.runtime in compiler mirror not found.'. Check Error Log for details.
  • The project cannot be built until build path errors are resolved

I've tried installing the ADT plugin in the Scala IDE, and it makes no difference. As far as I can see the Scala library is referenced correctly, and "plain" Scala projects created using the Eclipse wizard have no problems. When I put a simple "Hello World" class in the hallo-scaolid-sbt project it also won't run from Eclipse.

The Scala version seems to be 2.11.5 in both hello-scaloid-sbt and Scala IDE 4.0

The code compiles and runs fine in SBT itself.

I've had a quick look through the generated eclipse files and it all looks very similar to a "plain" Scala project.

No devices connected

Hi, I followed the instruction to run hello-scaloid-sbt. I created 2 virtual devices for both API 8 and the latest. But when I run: sbt android:run, I got this
java.lang.RuntimeException: no devices connected
at scala.sys.package$.error(package.scala:27)
at android.Commands$.targetDevice(commands.scala:167)
at android.Tasks$$anonfun$80.apply(tasks.scala:1385)
at android.Tasks$$anonfun$80.apply(tasks.scala:1382)
at scala.Function5$$anonfun$tupled$1.apply(Function5.scala:35)
at scala.Function5$$anonfun$tupled$1.apply(Function5.scala:34)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
at sbt.std.Transform$$anon$4.work(System.scala:64)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at sbt.Execute.work(Execute.scala:244)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
error no devices connected

Any wrong with my config?

Various issues when import project to Idea

Hi @pocorall

I experience different issues with scaloid sbt impoting to Idea. The seed repo of May 2015 was much better as for me.

  1. It seems that README.markdown is not correct now because this
 $ android update project -p . # in the root of the project

Is not possible to run in the root of the project because "android" command requires Manifest.xml which is located in root/src/main/. This current (updated) seed looks more like it has activator structure. I can be wrong with this.

  1. I think Scala/SBT framework requires one source folders and Idea Android framework requires another source folders. I can be wrong because I am not sure is it right to enable Android framework in Idea sbt project.

  2. The last is that after project is imported varios errors related to source forlders appear at once and at compile time

I was trying to import this project many times with different settings an configs but nothing helps. Only previos repository of May 2015 works well with it's README.markdown. Also it's structure is the same as Idea Android project structure when imported. With previos seed I don't have any problems whichs happen with current seed. I tried current seed in Ubuntu, Windows 7, Idea 14/15 and different bundles of Idea and Scala plugins inluding 1.5.4 Scala plugin.

Thanks for help

Failed to import into IntelliJ IDEA 14.1.4

After running android update project -p ., I tried to import the project into IntelliJ IDEA 14.1.4 and got the following error:

[info] Loading project definition from C:\Users\User\Documents\android-scaloid\project
C:\Users\User\Documents\android-scaloid\build.sbt:3: error: illegal start of simple expression
import android.Keys._
^
[error] Error parsing expression.
Invalid response.

I didn't make any modification to build.sbt.

Other than the import problem everything is fine. It builds and runs perfectly fine.

Building with sbt : proguard error

Hi,
Thanks for your work. I don't know if it's the right place to ask for this but, I'm a beginner and I got a little issue when building this. (I've followed all the steps) but when I try to build the solution, I got this error message :
error

Thanks !

Can not add new activity class to Scaloid project

Hi guys

I have imported project by readme to Idea 15. It runs normally. When I copy HelloScaloid activity class to HelloScaloid2 - it can not be started from HelloScaloid activity. The acitivity also has been added to manifest and proguard-sbt

startActivity(SIntent[HelloScaloid2])

05-02 20:43:48.446 3136-3136/scaloid.example E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: scaloid.example, PID: 3136 java.lang.NoClassDefFoundError: Failed resolution of: Lorg/scaloid/common/SIntent$; at scaloid.example.HelloScaloid$$anonfun$1.apply$mcV$sp(HelloScaloid.scala:27) at scaloid.example.HelloScaloid$$anonfun$1.apply(HelloScaloid.scala:10) at scaloid.example.HelloScaloid$$anonfun$1.apply(HelloScaloid.scala:10) at org.scaloid.common.SActivity$$anonfun$onCreate$1$$anonfun$apply$mcV$sp$1.apply(app.scala:144) at org.scaloid.common.SActivity$$anonfun$onCreate$1$$anonfun$apply$mcV$sp$1.apply(app.scala:144) at scala.collection.Iterator$class.foreach(Iterator.scala:742) at scala.collection.AbstractIterator.foreach(Iterator.scala:1194) at scala.collection.IterableLike$class.foreach(IterableLike.scala:72) at scala.collection.AbstractIterable.foreach(Iterable.scala:54) at org.scaloid.common.SActivity$$anonfun$onCreate$1.apply$mcV$sp(app.scala:144) at org.scaloid.common.SActivity$$anonfun$onCreate$1.apply(app.scala:144) at org.scaloid.common.SActivity$$anonfun$onCreate$1.apply(app.scala:144) at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58) at org.scaloid.common.SActivity$class.onCreate(app.scala:143) at scaloid.example.HelloScaloid.onCreate(HelloScaloid.scala:6) at android.app.Activity.performCreate(Activity.java:6237) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) at android.app.ActivityThread.-wrap11(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) Caused by: java.lang.ClassNotFoundException: Didn't find class "org.scaloid.common.SIntent$" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/data/app/scaloid.example-1/base.apk"],nativeLibraryDirectories=[/data/app/scaloid.example-1/lib/x86_64, /vendor/lib64, /system/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469)             at scaloid.example.HelloScaloid$$anonfun$1.apply$mcV$sp(HelloScaloid.scala:27)             at scaloid.example.HelloScaloid$$anonfun$1.apply(HelloScaloid.scala:10)             at scaloid.example.HelloScaloid$$anonfun$1.apply(HelloScaloid.scala:10)             at org.scaloid.common.SActivity$$anonfun$onCreate$1$$anonfun$apply$mcV$sp$1.apply(app.scala:144)             at org.scaloid.common.SActivity$$anonfun$onCreate$1$$anonfun$apply$mcV$sp$1.apply(app.scala:144)             at scala.collection.Iterator$class.foreach(Iterator.scala:742)             at scala.collection.AbstractIterator.foreach(Iterator.scala:1194)             at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)             at scala.collection.AbstractIterable.foreach(Iterable.scala:54)             at org.scaloid.common.SActivity$$anonfun$onCreate$1.apply$mcV$sp(app.scala:144)             at org.scaloid.common.SActivity$$anonfun$onCreate$1.apply(app.scala:144)             at org.scaloid.common.SActivity$$anonfun$onCreate$1.apply(app.scala:144)             at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)             at org.scaloid.common.SActivity$class.onCreate(app.scala:143)             at scaloid.example.HelloScaloid.onCreate(HelloScaloid.scala:6)             at android.app.Activity.performCreate(Activity.java:6237)             at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)             at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)             at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)             at android.app.ActivityThread.-wrap11(ActivityThread.java)             at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)             at android.os.Handler.dispatchMessage(Handler.java:102)             at android.os.Looper.loop(Looper.java:148)             at android.app.ActivityThread.main(ActivityThread.java:5417)             at java.lang.reflect.Method.invoke(Native Method)             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) Suppressed: java.lang.ClassNotFoundException: org.scaloid.common.SIntent$ at java.lang.Class.classForName(Native Method) at java.lang.BootClassLoader.findClass(ClassLoader.java:781) at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) at java.lang.ClassLoader.loadClass(ClassLoader.java:504) ... 28 more Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

The app runs via Play button in idea

Test setup example.

Hi,

Thank you for your work. I am trying out this skeleton project and planing of using it. I notice that there is no test setup for the project. Would you be kind enough to show how to set those up with this project? I looked up on android-sdk-plugin examples but only one has androidTest in them. And unfortunately, that does not work when I tried to follow it. Thank you for your help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.