Introduction
– Android TV application hands on tutorial 1

androidtvapptutorial6

[updated 2015.11.16]: Revise (sentence structure refactoring). Android TV application development introduction Currently, we have still not enough introduction for Android TV application development yet. In this series of tutorial, I will introduce how to develop Android TV application. The aim of this post is to understand Android “TV” specific code implementation, especially focusing on UI implementaion. Because UI is one of the biggest difference between Android phone app and Android TV app. We need to make UI suitable for TV usage, for example we should make an app so that we can navigate the application only using ↑↓→← direction keys, instead of touchpad navigation. Because user uses remote controller, and cannot use “touch screen” function […]

Continue reading →

no suitable constructor found for HeaderItem(int,String,)

I got following error when I try to build android TV sample application. D:\workspace\androidstudio\AndroidTVsample\app\src\main\java\com\corochann\androidtvsample\MainFragment.java Error:(109, 33) error: no suitable constructor found for HeaderItem(int,String,<null>) constructor HeaderItem.HeaderItem(long,String) is not applicable (actual and formal argument lists differ in length) constructor HeaderItem.HeaderItem(String) is not applicable (actual and formal argument lists differ in length) Error:(113, 33) error: no suitable constructor found for HeaderItem(int,String,<null>) constructor HeaderItem.HeaderItem(long,String) is not applicable (actual and formal argument lists differ in length) constructor HeaderItem.HeaderItem(String) is not applicable (actual and formal argument lists differ in length) D:\workspace\androidstudio\AndroidTVsample\app\src\main\java\com\corochann\androidtvsample\PlaybackOverlayFragment.java Error:(316, 29) error: no suitable constructor found for HeaderItem(int,String,<null>) constructor HeaderItem.HeaderItem(long,String) is not applicable (actual and formal argument lists differ in length) constructor HeaderItem.HeaderItem(String) is […]

Continue reading →

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 […]

Continue reading →

Plugin with id ‘android-sdk-manager’ not found

When you face this bug when trying to build Android source code, try following. Add below inside “dependencies” of top folder of build.gradle (Project: TVDemoApp)         classpath ‘com.android.tools.build:gradle:1.0.0′         classpath ‘com.jakewharton.sdkmanager:gradle-plugin:0.12.0′   Reference: http://stackoverflow.com/questions/26472221/plugin-with-id-android-sdk-manager-not-found  

Continue reading →

Building Android TV sample application

AndroidTVsampleApp-2015-07-01-150913

Let’s look how Android TV app works by building this sample application. At the time of writing (2015/6/25), I faced a compile error for building default sample application  for Android TV. I wrote another posts that how to resolve these issues, which are the temporary counter measure until the errors will be fixed by AOSP. Environment Android studio version: 1.2.2 Build 141.1980579 SDK version: API level 21 & 22. Procedure 1. Launch Android studio → Start a new Android Studio project 2. “New project” display, fill in below. Application name: use your own preference (Ex. HelloAndroidTV) Company Domain: use your own preference (Ex. yourname.com) and go “Next”. 3. “Target Android Devices” display Uncheck “Phone […]

Continue reading →