LoginSignup
3
5

More than 1 year has passed since last update.

Androidのライブラリプロジェクト内のKotlinクラスを参照するとUnresolved referenceが出る問題対処

Last updated at Posted at 2019-04-04

Androidプロジェクトから別のAndoridライブラリプロジェクト内のKotlinクラスを参照した時に、Unresolved referenceとなりビルドエラー発生。1hくらいはまったのでメモを残す。

原因

ライブラリプロジェクトのbuild.gradleにKotlin用の記述が漏れているため。
(Androidライブラリプロジェクト作成時、Kotlin用の記述は自動生成されない)

解決方法

ライブラリプロジェクトを開いて、以下を実施。
Tools -> Kotlin -> 'Configure Kotlin in projects'
(All modules with Kotlin files are configured'を選択してOK。

参考

3
5
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
3
5