Re: [android-developers] R17: a library project cannot depend on another library project?

2012-03-26 Thread James Su
Thanks a lot for your information. Is there any document describing the
difference between adding a library into Java Build Path or as an android
Library?

2012/3/26 Nikolay Elenkov 

> On Mon, Mar 26, 2012 at 4:15 PM, James Su  wrote:
> > The code works again by adding project B into A's Java Build Path. Not
> sure
> > if it's the correct solution.
> >
>
> It's not.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] R17: a library project cannot depend on another library project?

2012-03-26 Thread James Su
The code works again by adding project B into A's Java Build Path. Not sure
if it's the correct solution.

2012/3/26 James Su 

> But the problem is that the code of library A and B are not owned by us,
> we can't simply change their source code, though we can access them. I'm
> just wondering if it's a change made in R17, as the code works with R16?
>
>
> 2012/3/26 Nikolay Elenkov 
>
>> On Mon, Mar 26, 2012 at 12:08 PM, James Su  wrote:
>> > Hi all,
>> >   Yesterday I updated my development environment to Android SDK R17, and
>> > then it failed to build one of my library project (say A) which depends
>> on
>> > another library project (say B), because B's R class cannot be found in
>> A. I
>> > checked the code in A's gen/ and found that B's R class was no longer
>> there,
>> > but it was there when using R16.
>> >   Does anybody know how to fix this issue?
>> >
>>
>> Change each project to use it's own R file. It will include all resources
>> from
>> projects it depends on. For example:
>>
>> In project B:
>>
>> import com.project.b.R;
>>
>> In project A:
>>
>> import com.project.a.R;
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] R17: a library project cannot depend on another library project?

2012-03-26 Thread James Su
But the problem is that the code of library A and B are not owned by us, we
can't simply change their source code, though we can access them. I'm just
wondering if it's a change made in R17, as the code works with R16?

2012/3/26 Nikolay Elenkov 

> On Mon, Mar 26, 2012 at 12:08 PM, James Su  wrote:
> > Hi all,
> >   Yesterday I updated my development environment to Android SDK R17, and
> > then it failed to build one of my library project (say A) which depends
> on
> > another library project (say B), because B's R class cannot be found in
> A. I
> > checked the code in A's gen/ and found that B's R class was no longer
> there,
> > but it was there when using R16.
> >   Does anybody know how to fix this issue?
> >
>
> Change each project to use it's own R file. It will include all resources
> from
> projects it depends on. For example:
>
> In project B:
>
> import com.project.b.R;
>
> In project A:
>
> import com.project.a.R;
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] R17: a library project cannot depend on another library project?

2012-03-25 Thread James Su
Hi all,
  Yesterday I updated my development environment to Android SDK R17, and
then it failed to build one of my library project (say A) which depends on
another library project (say B), because B's R class cannot be found in A.
I checked the code in A's gen/ and found that B's R class was no longer
there, but it was there when using R16.
  Does anybody know how to fix this issue?

Thanks a lot
James Su

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Developing from android device

2012-03-25 Thread James Su
You may try this app:
https://play.google.com/store/apps/details?id=com.aide.ui

2012/3/25 Andrew Demidenko 

> hi guys.
> is there any way to develop (compile and then run) android applications
> from android device.
> for example, i haven't got laptop or any other mobility pc and i want to
> implement some feature for my application while busyness trip. Can i do it
> from my android device?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] How to reference custom xml attributes in a testing xml resource?

2012-03-25 Thread James Su
Hi all,
  I'm developing an android application which has a custom view with some
custom xml attributes. The attributes are defined in res/values/attrs.xml,
like:


  

  


And in CustomView.java, the attributes are loaded with TypedArray, like:

public class CustomView extends View {

public CustomView(Context context, AttributeSet attrs) {
TypedArray a = context.obtainStyledAttributes(attrs,
R.styleable.CustomView);
...;
a.recycle();
}

This CustomView works correctly in the main apk.

Then I want to write an instrumentation test to test this CustomView, so I
write a test layout file, which looks like:

tests/res/layout/test-layout.xml:

http://schemas.android.com/apk/res/android";

xmlns:myapp="http://schemas.android.com/apk/res/com.mycompany.myapp<http://schemas.android.com/apk/res/com.google.android.apps.myapp>"
>





But Eclipse always complains: No resource identifier found for attribute
'custom_attr' in package '...'.

I know that in the recent Android SDK r17, a new special xmlns "
http://schemas.android.com/apk/res-auto"; is introduced to solve this issue
for library projects, but unfortunately, it doesn't work for my case.  Anybody
know how to fix this problem?

Best Regards
James Su

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] How to reference custom xml attributes in a testing xml resource?

2012-03-25 Thread James Su
Hi all,
  I'm developing an android application which has a custom view with some 
custom xml attributes. The attributes are defined in res/values/attrs.xml, 
like:


  

  


And in CustomView.java, the attributes are loaded with TypedArray, like:

public class CustomView extends View {

public CustomView(Context context, AttributeSet attrs) {
TypedArray a = context.obtainStyledAttributes(attrs, 
R.styleable.CustomView);
...;
a.recycle();
}

This CustomView works correctly in the main apk.

Then I want to write an instrumentation test to test this CustomView, so I 
write a test layout file, which looks like:

tests/res/layout/test-layout.xml:

http://schemas.android.com/apk/res/android";

xmlns:myapp="http://schemas.android.com/apk/res/com.<http://schemas.android.com/apk/res/com.google.android.apps.myapp>mycompany.myapp"
 
>





But Eclipse always complains: No resource identifier found for attribute 
'custom_attr' in package 'com.mycompany.myapp'.

Anybody know how to fix this problem?

Best Regards
James Su

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en