0
0

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.

R classの中身が空っぽ(生成はされる)になった時の対処

Posted at

R classの中身が空っぽになる現象に遭遇し、意外な所に原因があったため書いておきます。

事象

スクリーンショット 2019-10-18 21.56.56.png `R.layout` までは見つかる・・・ が スクリーンショット 2019-10-18 21.57.53.png 中身が `main` しか無い!

プロジェクトをインポートし直すと、正常にRを生成してくれる。でも3日くらい経つと、また生成してくれなくなる。(ここが原因判明まで時間がかかった理由)

この唯一あるmainというのはどうやらライブラリプロジェクトのものらしい、ということまですぐ分かった。

原因

同一のpackage名を利用したプロジェクトが混在している
スクリーンショット 2019-10-18 22.03.18.png
同じプロジェクト内に、アプリのpackageと同一の名前を使ったライブラリが存在していました。ライブラリ側のpackageを編集すると直った。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?