###前提・実現したいこと
https://anharu.keiji.io/lesson1/
こちらで公開されている電卓アプリを作りたいのですが、
最初の設定?でエラーが表示されてしまいます。
###発生している問題・エラーメッセージ
1、「cannot resolve symbol」
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity">
activity_main.xmlの冒頭の設定部で、@dimen~の4行が存在しない?としてエラー表示されます。
2、「R」のエラー
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
MainActivity.javaにてRが赤字になってしまいます。
###試したこと
Googleで検索しましたが、調べ方が悪いのか、1,2ともに類似の状況にすらたどり着けません。
androidstudioがver2.3.1で初期設定がRelativeLayoutではなかったのですが、
RelativeLayout形式(?)に書き換えれば問題ないという記事をみて、コピペをしたところエラーが出ている次第です。
###補足情報(言語/FW/ツール等のバージョンなど)
かなり初歩の質問で申し訳ないのですが対処方法のアドバイスをいただけると非常にうれしいです。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/06/20 12:02
2017/06/20 12:15