cancel
Showing results for 
Search instead for 
Did you mean: 

Android programming with Studio

FIXED
HairyMcbiker
All Star
Posts: 6,792
Thanks: 266
Fixes: 21
Registered: ‎16-02-2009

Android programming with Studio

Anybody used android studio?

I am trying to get to grips with android programming and downloaded the studio.
I am working through the online guide  HERE

But when I use the code:

 app:layout_behavior="@string/appbar_scrolling_view_behavior"

I get an error thrown by the compiler.
I have searched but not found any clues.

7 REPLIES 7
Anonymous
Not applicable

Re: Android programming with Studio

@HairyMcbiker - What is the compiler error you're getting? And have you followed all of the instructions?

 

Anonymous
Not applicable

Re: Android programming with Studio

I forgot to ask if you'd created the appbar_scrolling_view_behavior in your resources? It's not going to work until that is done.

Anonymous
Not applicable

Re: Android programming with Studio

@HairyMcbiker - I don't know if you've got this fixed but I have had a quick review of the tutorial and I see that the appbar_scrolling_view_behavior resource is within the app namespace meaning that this value is external so you do not need to add it yourself. The app namespace is defined on this line:

xmlns:app="http://schemas.android.com/apk/res-auto"

within the LinearLayout element, make sure that there are no typos and this resource is accessible from your dev machine.

HairyMcbiker
All Star
Posts: 6,792
Thanks: 266
Fixes: 21
Registered: ‎16-02-2009

Re: Android programming with Studio

I had entered it all by hand, then cut & pasted got same error.
Errors are:

Error:(1) No resource identifier found for attribute 'layout_behavior' in package 'com.example.hairybiker.myfirstapp'

Error:(8, 26) No resource found that matches the given name (at 'layout_behavior' with value '@string/appbar_scrolling_view_behavior').

I will restart and try again. But have done this 3 times so far with same error.

 

EDIT:

One thing.  It says use the Blank Activity but there isn't a Blank one, there is a Basic or an Empty, I have been using Empty will try Basic now.

HairyMcbiker
All Star
Posts: 6,792
Thanks: 266
Fixes: 21
Registered: ‎16-02-2009

Re: Android programming with Studio

Fix
OK it was the fact that I was using Empty not Basic, would have thought they would have fixed that on the guide by now.
HairyMcbiker
All Star
Posts: 6,792
Thanks: 266
Fixes: 21
Registered: ‎16-02-2009

Re: Android programming with Studio

Wow talking about reanimating the dead. I asked that question 18 months ago.
HairyMcbiker
All Star
Posts: 6,792
Thanks: 266
Fixes: 21
Registered: ‎16-02-2009

Re: Android programming with Studio

No problems, but I fixed it way back then. It was the initial setup choice.