Thanks Nick and pfn for your suggestions.
I've solved the 1.7 compatibility.
But even if I add the aar("com.google.android.gms" % "play-services" %
"4.+")
I'll attach more info.
build.gradle is a Gradle config. that generates successfully my project, so
my project setup musn't be so bad.
Output from "sbt compile":
Loading /home/david/bin/sbt/bin/sbt-launch-lib.bash
> [info] Loading project definition from
> /home/david/rds/cli/android/Incidencias/project
> [info] Updating
> {file:/home/david/rds/cli/android/Incidencias/project/}incidencias-build...
> [info] Resolving org.fusesource.jansi#jansi;1.4 ...
> [info] Done updating.
> [info] Set current project to Incidencias (in build
> file:/home/david/rds/cli/android/Incidencias/)
> [info] Generating R.java
> [warn]
> /home/david/rds/cli/android/Incidencias/target/android-bin/AndroidManifest.xml:34:
>
> error: Error: No resource found that matches the given name (at 'value'
> with value '@integer/google_play_services_version').
> com.android.ide.common.internal.LoggedErrorException: Failed to run
> command:
> /home/david/bin/android-sdk/build-tools/19.0.2/aapt package -f
> --no-crunch -I /home/david/bin/android-sdk/platforms/android-17/android.jar
> -M
> /home/david/rds/cli/android/Incidencias/target/android-bin/AndroidManifest.xml
>
> -S /home/david/rds/cli/android/Incidencias/target/android-bin/resources/res
> -A /home/david/rds/cli/android/Incidencias/target/android-bin/assets -m -J
> /home/david/rds/cli/android/Incidencias/target/android-gen -G
> /home/david/rds/cli/android/Incidencias/target/android-bin/proguard.txt
> --debug-mode --custom-package es.fcc.incidences
> Error Code:
> 1
> Output:
>
> /home/david/rds/cli/android/Incidencias/target/android-bin/AndroidManifest.xml:34:
>
> error: Error: No resource found that matches the given name (at 'value'
> with value '@integer/google_play_services_version').
>
> at
> com.android.ide.common.internal.CommandLineRunner.runCmdLine(CommandLineRunner.java:98)
> at
> com.android.ide.common.internal.CommandLineRunner.runCmdLine(CommandLineRunner.java:69)
> at
> com.android.builder.AndroidBuilder.processResources(AndroidBuilder.java:728)
> at android.Tasks$.aapt(tasks.scala:921)
> at
> android.Tasks$$anonfun$55$$anonfun$apply$71.apply(tasks.scala:894)
> at
> android.Tasks$$anonfun$55$$anonfun$apply$71.apply(tasks.scala:892)
> at
> sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:202)
> at
> sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:198)
> at sbt.Difference.apply(Tracked.scala:177)
> at sbt.Difference.apply(Tracked.scala:158)
> at
> sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:198)
> at
> sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:197)
> at sbt.Difference.apply(Tracked.scala:177)
> at sbt.Difference.apply(Tracked.scala:152)
> at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:197)
> at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:195)
> at android.Tasks$$anonfun$55.apply(tasks.scala:900)
> at android.Tasks$$anonfun$55.apply(tasks.scala:883)
> at scala.Function9$$anonfun$tupled$1.apply(Function9.scala:35)
> at scala.Function9$$anonfun$tupled$1.apply(Function9.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] (android:rGenerator)
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
> [error] /home/david/bin/android-sdk/build-tools/19.0.2/aapt
> package -f --no-crunch -I
> /home/david/bin/android-sdk/platforms/android-17/android.jar -M
> /home/david/rds/cli/android/Incidencias/target/android-bin/AndroidManifest.xml
>
> -S /home/david/rds/cli/android/Incidencias/target/android-bin/resources/res
> -A /home/david/rds/cli/android/Incidencias/target/android-bin/assets -m -J
> /home/david/rds/cli/android/Incidencias/target/android-gen -G
> /home/david/rds/cli/android/Incidencias/target/android-bin/proguard.txt
> --debug-mode --custom-package es.fcc.incidences
> [error] Error Code:
> [error] 1
> [error] Output:
> [error]
> /home/david/rds/cli/android/Incidencias/target/android-bin/AndroidManifest.xml:34:
>
> error: Error: No resource found that matches the given name (at 'value'
> with value '@integer/google_play_services_version').
> [error] Total time: 1 s, completed Mar 6, 2014 8:31:39 PM
>
>
Here is an excerpt from my AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="es.fcc.incidences"
android:versionCode="81"
android:versionName="81">
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="17"/>
<permission
android:name="es.fcc.incidences.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
<application android:name=".IncidencesApplication"
android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".IncidenciasActivity"
android:label="@string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data android:name="com.google.android.maps.v2.API_KEY"
android:value="......."/>
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
</application>
</manifest>
Am Donnerstag, 6. März 2014 16:47:21 UTC+1 schrieb pfn:
>
> When having issues, attach full logs.
>
> use aar(...) which should be implicit anyway, again, attach full logs;
> specifically include log of a clean build
>
> By default, android-sdk-plugin forces 1.6 source/target, to change this,
> you can do something like:
>
> javacOptions in Compile <<= (javacOptions in Compile) map { _ collect {
> case "1.5" => "1.7"
> case s => s
> }
> }
>
> Of course, to use 1.7, you'll need to be on build-tools 19
>
> On Thursday, March 6, 2014 12:13:35 AM UTC-8, David Pérez wrote:
>>
>> Before reading your recommendations, I've tried Gradle, and it works ok:
>> it signs my apk, runs lint, .....
>> The problem has been that IDEA doesn't allow me to mix Gradle and
>> non-Gradle modules in the same project. A big limitation for me.
>>
>> So, I've followed your suggestion, and used the android-sdk-plugin.
>>
>> Problems I'm having:
>>
>> - If I compile with sbt, I get this error:
>>
>> AndroidManifest.xml:34: error: Error: No resource found that matches the
>>> given name (at 'value' with value '@integer/google_play_services_version')
>>>
>>
>> I think this is due to the fact I'm using play-services
>> ("com.google.android.gms" % "play-services" % "4.+") , but its resources
>> aren't included.
>>
>> - If I compile with IDEA 13 (it uses SBT):
>>
>> java: javacTask: source release 1.7 requires target release 1.7
>>>
>> even though I have this in build.sbt:
>>
>> javacOptions ++= Seq("-source", "1.7", "-target", "1.7")
>>>
>>
>> Has this happened to anybody else?
>>
>> Am Dienstag, 4. März 2014 17:36:29 UTC+1 schrieb Nick Stanchenko:
>>>
>>> As I mentioned in the other post, the 2nd and the 3rd are the same. The
>>> first one is much more actively developed, so it’s probably a better choice
>>> for starting out.
>>>
>>> Nick
>>>
>>
--
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/groups/opt_out.
build.sbt
Description: Binary data
build.gradle
Description: Binary data
