String types not allowed (at ‘slideEdge’ with value ‘end’)

I got following error when I try to build android TV sample application.

TVDemoApp\app\build\intermediates\exploded-aar\com.android.support\leanback-v17\22.1.1\res\transition-v22\lb_browse_entrance_transition.xml
Error:(26, 26) String types not allowed (at 'slideEdge' with value 'end').
TVDemoApp\app\build\intermediates\exploded-aar\com.android.support\leanback-v17\22.1.1\res\transition-v22\lb_browse_return_transition.xml
Error:(21, 26) String types not allowed (at 'slideEdge' with value 'start').
Error:(30, 26) String types not allowed (at 'slideEdge' with value 'end').
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
C:\Users\corochann\AppData\Local\Android\sdk\build-tools\21.1.1\aapt.exe package -f --no-crunch -I C:\Users\corochann\AppData\Local\Android\sdk\platforms\android-21\android.jar -M D:TVDemoApp\app\build\intermediates\manifests\full\debug\AndroidManifest.xml -S D:TVDemoApp\app\build\intermediates\res\debug -A D:TVDemoApp\app\build\intermediates\assets\debug -m -J D:TVDemoApp\app\build\generated\source\r\debug -F D:\workspace\github\bugfix_episode_4\episode_1\TVDemoApp\app\build\intermediates\res\resources-debug.ap_ --debug-mode --custom-package com.sgottard.tvdemoapp -0 apk --output-text-symbols D:TVDemoApp\app\build\intermediates\symbols\debug
Error Code:
1
Output:
D:TVDemoApp\app\build\intermediates\res\debug\transition-v22\lb_browse_entrance_transition.xml:23: error: Error: String types not allowed (at 'slideEdge' with value 'end').
D:TVDemoApp\app\build\intermediates\res\debug\transition-v22\lb_browse_return_transition.xml:18: error: Error: String types not allowed (at 'slideEdge' with value 'start').
D:TVDemoApp\app\build\intermediates\res\debug\transition-v22\lb_browse_return_transition.xml:27: error: Error: String types not allowed (at 'slideEdge' with value 'end').

How to fix

You need to update configuration of compile SDK version.

update build.gradle (Module: app) as follows.

1. specify compileSdkVersion as 22, not 21.

    compileSdkVersion 22

2. specify dependencies library version as

compile ‘com.android.support:recyclerview-v7:22.1.1
compile ‘com.android.support:leanback-v17:22.1.1
compile ‘com.android.support:appcompat-v7:22.1.1

and build again.

Reference: http://stackoverflow.com/questions/29149362/androidtv-leanback-master-build-errors

Leave a Comment

Your email address will not be published. Required fields are marked *