4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[android] v17 Leanback Libraryをeclipseで使う方法

Posted at

概要

android 5.0から新しくはいったsupport libary Leanback をeclipseで使う方法の説明。

前提条件

  1. SDK versionを24.0以上にしておく
  2. Android 5.0以上のSDKをいれておく
  3. AndroidManifest.xmlのtargetをAPI level 21に設定

導入

  1. eclipse > File > Import
  2. Android > Existing Android Code Into Workspace > Next
  3. Browse... > SDKディレクトリ/extra/android/support/v17/leanback
  4. Finsh > Package Explorerにandroid-support-v17-leanbackが追加される
  5. libs/フォルダをクリック > android-support-v17-leanback.jarを右クリック > Build Path > Add to Build Path
  6. 再度 libs/フォルダにある android-support-v17-leanback.jarを右クリック > Build Path > Configure Build Path
  7. Order and Exportのタブを選択 > android-support-v17-leanback.jarをクリックして選択
  8. Android Dependencies の選択を解除
  9. OKで完了

ハマった点

  • android-support-v17-leanbackを追加した時点でresがエラーとなってしまっていた、エラー内容は以下。

No resource found that matches the given name: attr 'android:actionModeShareDrawable'
  • 解決策
    android-support-v17-leanbackフォルダにあるproject.propertiesを開いてtarget=android-19となっている行をtarget=android-21に変更。その後、Project > Clean...で解決

使ってみる

  1. leanback libararyを使いたいプロジェクトを右クリック > Properties
  2. Projectsタブを選択 > Add > android-support-v17-leanbackを選択
  3. OKで完了
4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?