android.R.styleable can't be resolved?
flag
Messages 1 - 10 of 14 - Collapse all
/groups/adfetch?adid=j-E7LRAAAAANJNfOOc1qJSbvQKgT-ruG
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
1.  Derek  
View profile  
 More options Mar 12 2009, 6:22 pm
From: Derek <xianguan...@gmail.com>
Date: Thu, 12 Mar 2009 15:22:41 -0700 (PDT)
Local: Thurs, Mar 12 2009 6:22 pm
Subject: android.R.styleable can't be resolved?
Hi,

I'm using the last android sdk 1.1r1. Eclipse complains about class
android.R.styleable. I can't see R$styleable.class inside of
android.jar\android either. But it's in the api doc. By using java
reflection as below, android.R does have inner class called styleable.
Could someone tell me what the problem is?

        for (Class c : android.R.class.getClasses()) {
                        if (c.getName().indexOf("styleable") >= 0) {
                                        Log .w("!!!!!!!!!!!!!!", c.getName());
                        }
        }

Thanks,
Derek


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
2.  Dianne Hackborn  
View profile  
 More options Mar 12 2009, 6:42 pm
From: Dianne Hackborn <hack...@android.com>
Date: Thu, 12 Mar 2009 15:42:24 -0700
Local: Thurs, Mar 12 2009 6:42 pm
Subject: Re: [android-developers] android.R.styleable can't be resolved?

styleable was removed from the SDK; this shouldn't have been in the SDK,
because the values it contains change between releases.  It also is not
needed in any way for applications: these are just sets of resources that
are interesting to specific pieces of code.  You should use
<declare-styleable> in your own app to create an explicit set of resources
you want and use that.

--
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
3.  Derek  
View profile  
 More options Mar 12 2009, 7:19 pm
From: Derek <xianguan...@gmail.com>
Date: Thu, 12 Mar 2009 16:19:54 -0700 (PDT)
Local: Thurs, Mar 12 2009 7:19 pm
Subject: Re: android.R.styleable can't be resolved?
fair enough. it did not explain java reflection still found the inner
class was there though.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
4.  Dianne Hackborn  
View profile  
 More options Mar 12 2009, 7:34 pm
From: Dianne Hackborn <hack...@android.com>
Date: Thu, 12 Mar 2009 16:34:31 -0700
Local: Thurs, Mar 12 2009 7:34 pm
Subject: Re: [android-developers] Re: android.R.styleable can't be resolved?

Yes, they are still there, as are many other things in the framework that
are not in the SDK.  Be aware that using reflection is explicitly letting
you use stuff outside of the SDK, and you should could on your code
breaking, sooner or later, one way or another.

On Thu, Mar 12, 2009 at 4:19 PM, Derek <xianguan...@gmail.com> wrote:

> fair enough. it did not explain java reflection still found the inner
> class was there though.

--
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
5.  trans  
View profile  
 More options Mar 22 2011, 10:50 am
From: trans <transf...@gmail.com>
Date: Tue, 22 Mar 2011 07:50:26 -0700 (PDT)
Local: Tues, Mar 22 2011 10:50 am
Subject: Re: [android-developers] Re: android.R.styleable can't be resolved?

Why is this stuff documented as part of the SDK if it's not there?

http://developer.android.com/reference/android/R.styleable.html


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
6.  Justin Anderson  
View profile  
 More options Mar 22 2011, 10:54 am
From: Justin Anderson <magouyaw...@gmail.com>
Date: Tue, 22 Mar 2011 08:54:08 -0600
Local: Tues, Mar 22 2011 10:54 am
Subject: Re: [android-developers] Re: android.R.styleable can't be resolved?

Ummm... it is.  What does your code look like?

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
7.  trans  
View profile  
 More options Mar 22 2011, 11:30 am
From: trans <transf...@gmail.com>
Date: Tue, 22 Mar 2011 08:30:57 -0700 (PDT)
Local: Tues, Mar 22 2011 11:30 am
Subject: Re: [android-developers] Re: android.R.styleable can't be resolved?

I am very confused as it seems I am getting conflicting information.
Basically I using the Keyboard and KeyboardView code as a basis for building
my one Keyboard. I would have like to subclassed these classes, but certain
issues arose that made that approach too limiting (namely adjusting the
background image of each key). So I am having to re-implement these classes.
The code for these classes contains references to
`com.android.internal.R.styleable.Keyboard` and the like. But they can't be
found. So I tried replacing it with just `R.styleable.Keyboard` and get the
error that `R.styleable` can't be found, though I am using `import
android.R;`.

At this point I did some more research and decided I must need to create all
the style attributes myself in a resource file. So I created a resource file
in xml/values/resources.xml with:

<declare-styleable name="Keyboard">
<attr name="keyWidth" format="dimension|fraction" />
<attr name="keyHeight" format="dimension|fraction" />
<attr name="horizontalGap" format="dimension|fraction" />
<attr name="verticalGap" format="dimension|fraction" />
</declare-styleable>

But I still get an error:

    [javac] Compiling 4 source files to
/home/trans/workspace/microboard/bin/classes
    [javac]
/home/trans/workspace/microboard/src/com/tabcomputing/android/microboard/Ke yboard.java:170:
cannot find symbol
    [javac] symbol  : variable styleable
    [javac] location: class android.R
    [javac]             TypedArray a =
res.obtainAttributes(Xml.asAttributeSet(parser), R.styleable.Keyboard);

Any help would be very appreciated.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
8.  Kostya Vasilyev  
View profile  
 More options Mar 22 2011, 11:36 am
From: Kostya Vasilyev <kmans...@gmail.com>
Date: Tue, 22 Mar 2011 18:36:14 +0300
Local: Tues, Mar 22 2011 11:36 am
Subject: Re: [android-developers] Re: android.R.styleable can't be resolved?
Regarding the compile error:

Apparently you kept "import android.R" in your source file. Replace it
with the import for your own "R" class.

-- Kostya

22.03.2011 18:30, trans пишет:

> But I still get an error:

> [javac] Compiling 4 source files to
> /home/trans/workspace/microboard/bin/classes
> [javac]
> /home/trans/workspace/microboard/src/com/tabcomputing/android/microboard/Ke yboard.java:170:
> cannot find symbol
> [javac] symbol : variable styleable
> [javac] location: class android.R
> [javac] TypedArray a =
> res.obtainAttributes(Xml.asAttributeSet(parser), R.styleable.Keyboard);

> Any help would be very appreciated.

--
Kostya Vasilyev -- http://kmansoft.wordpress.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
9.  trans  
View profile  
 More options Mar 22 2011, 11:45 am
From: trans <transf...@gmail.com>
Date: Tue, 22 Mar 2011 08:45:21 -0700 (PDT)
Local: Tues, Mar 22 2011 11:45 am
Subject: Re: [android-developers] Re: android.R.styleable can't be resolved?

My own R class? What class is that?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
10.  Kostya Vasilyev  
View profile  
 More options Mar 22 2011, 11:49 am
From: Kostya Vasilyev <kmans...@gmail.com>
Date: Tue, 22 Mar 2011 18:49:48 +0300
Local: Tues, Mar 22 2011 11:49 am
Subject: Re: [android-developers] Re: android.R.styleable can't be resolved?

22.03.2011 18:45, trans пишет:

> My own R class? What class is that?

import your.package.name.your.app.name.R;

It's generated during the build process under "gen".

Additionally, you might want to try using Eclipse.

--
Kostya Vasilyev -- http://kmansoft.wordpress.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2013 Google