The problem you have is because by putting your deps in *.sbt file inside project dir you make your project build sources (project dir is itself an sbt project) depend on them i.e. you can use them in your project/*.scala files. Instead you should create build.sbt file in your app dir and put dependencies there. Please consult sbt documentation for more details and how to get started.
Otherwise if sbt makes life too hard for you you might want to checkout scala-android plugin for gradle. 28 сент. 2014 г. 1:42 пользователь "Perry Nguyen" <[email protected]> написал: > > Dependencies don't go in plugins.sbt, and I can't see your link from my phone > > -- > Sent from my phone > > On Sep 27, 2014 2:09 PM, "Oliver Hunt" <[email protected]> wrote: >> >> I'm trying to move an existing Java + Gradle Android project over to use sbt so I can write Scala. I've followed the instructions on https://github.com/pfn/android-sdk-plugin, and I'm getting the following error when I try and do 'sbt android:run': >> >> [error] Error Code: >> [error] 1 >> [error] Output: >> [error] aapt: warning: string 'app_name' in /home/ollie/Programming/Antox/app/target/android-bin/resources/res marked untranslatable but exists in locale 'ca' >> [error] /home/ollie/Programming/Antox/app/target/android-bin/resources/res/values/values.xml:218: error: Error retrieving parent for item: No resource found that matches the given name '@style/Theme.AppCompat.Light.DarkActionBar'. >> [error] /home/ollie/Programming/Antox/app/target/android-bin/resources/res/values/values.xml:220: error: Error retrieving parent for item: No resource found that matches the given name 'FloatingActionButton'. >> [error] /home/ollie/Programming/Antox/app/target/android-bin/resources/res/values/values.xml:221: error: Error: No resource found that matches the given name: attr 'floatingActionButtonColor'. >> [error] /home/ollie/Programming/Antox/app/target/android-bin/resources/res/values/values.xml:226: error: Error retrieving parent for item: No resource found that matches the given name '@style/Theme.AppCompat.Light.DarkActionBar'. >> [error] /home/ollie/Programming/Antox/app/target/android-bin/resources/res/values/values.xml:230: error: Error: No resource found that matches the given name: attr 'actionBarStyle'. >> [error] /home/ollie/Programming/Antox/app/target/android-bin/resources/res/values/values.xml:233: error: Error retrieving parent for item: No resource found that matches the given name '@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse'. >> [error] /home/ollie/Programming/Antox/app/target/android-bin/resources/res/values/values.xml:237: error: Error: No resource found that matches the given name: attr 'background'. >> [error] /home/ollie/Programming/Antox/app/target/android-bin/resources/res/values/values.xml:240: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat'. >> [error] Total time: 0 s, completed 27-Sep-2014 22:02:59 >> >> I also tried adding the dependencies I needed in plugins.sbt, but then I get an error that they failed to resolve. I've left them in but commented out so you can see. >> >> This is what I have at the moment: >> https://github.com/ollieh/Antox/tree/scala >> >> What am I doing wrong? >> >> Thanks, >> Ollie >> >> -- >> 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. > > -- > 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. -- 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.
