12
12

More than 5 years have passed since last update.

xmlのgraphical layout表示時にrendering: java.lang.System.arraycopy([CI[CII)Vが出る時の対応

Posted at

Android Developer tools で、Androidでlayoutのxmlファイルが以下のようなエラーが出て表示できなくなることがある。

Exception raised during rendering: java.lang.System.arraycopy([CI[CII)V

原因

layoutのレンダリングに利用しているAPIが原因。
API 20 (Android 4.4W:google wear用のAPI)には通常のAPIとくらべてwidgetがないものがある。例えばedittextは存在しない。

API 20をSDK managerを入れた状態でrendering方法でAutomatically pick bestを選択していると、API 20が利用されてしまい、上記のエラーが発生する。

解決策

Automatically pick bestを解除し、API 20以外を利用する。

  • 表示したいxmlを開き、Graphical Layoutタブを表示する。
  • 上にあるドロイド君を選択し、Automatically pick bestチェックを外し、APIを指定する。 以下のような感じ。

スクリーンショット 2014-08-04 12.51.54.png

参考

12
12
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
12
12