java - Android Studio (1.5.1) -- Error: cannot find symbol class / App won't run -


i'm working on first android application. it's simple farenheit/celsius converter, , of ids, methods, , buttons/text fields copied out. triple checked. (i'm following instructions video professor posted.) however, i'm having difficulty trying android studio run application.

i've found plenty of questions similar 1 , many of them suggest synchronizing gradle files. did. i'm still getting these same error messages:

enter image description here


here app information:

enter image description here

code app/res/layout/content_test.xml:

<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     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"     app:layout_behavior="@string/appbar_scrolling_view_behavior"     tools:context="john.testapplication.testactivity"     tools:showin="@layout/activity_test">      <edittext         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:inputtype="numberdecimal"         android:ems="10"         android:id="@+id/temperatureedittext"         android:layout_alignparenttop="true"         android:layout_alignparentleft="true"         android:layout_alignparentstart="true"         android:hint="enter temperature" />      <radiogroup         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_below="@+id/temperatureedittext"         android:layout_alignparentleft="true"         android:layout_alignparentstart="true"         android:id="@+id/radiogroup">          <radiobutton             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:text="from celsius farenheit"             android:id="@+id/tofarenheitradiobutton"             android:checked="false" />          <radiobutton             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:text="from farenheit celsius"             android:id="@+id/tocelsiusradiobutton"             android:checked="false" />     </radiogroup>      <button         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:text="convert"         android:id="@+id/convertbutton"         android:layout_below="@+id/radiogroup"         android:layout_alignparentleft="true"         android:layout_alignparentstart="true"         android:onclick="convert" /> </relativelayout> 

code app/res/layout/activitytest.xml: (i thought using relative layout, don't know if has problem)

<?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.coordinatorlayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     xmlns:tools="http://schemas.android.com/tools"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:fitssystemwindows="true"     tools:context="john.testapplication.testactivity">      <android.support.design.widget.appbarlayout         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:theme="@style/apptheme.appbaroverlay">          <android.support.v7.widget.toolbar             android:id="@+id/toolbar"             android:layout_width="match_parent"             android:layout_height="?attr/actionbarsize"             android:background="?attr/colorprimary"             app:popuptheme="@style/apptheme.popupoverlay" />      </android.support.design.widget.appbarlayout>      <include layout="@layout/content_test" />      <android.support.design.widget.floatingactionbutton         android:id="@+id/fab"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_gravity="bottom|end"         android:layout_margin="@dimen/fab_margin"         android:src="@android:drawable/ic_dialog_email" />  </android.support.design.widget.coordinatorlayout> 

again, building app video instructor gave me, i'm willing bet has version of android studio or settings on computer opposed code itself.

okay, on site, found solution. apparently in testactivity.xml, forgot import these:

import android.widget.edittext; import android.widget.radiobutton; 

fixed everything. had assumed imported. eugen pechanec helpful tips.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -