Re: [android-developers] Re: how to add --core-library to Eclipse ?

2013-09-13 Thread Manson Thomas
Hi Marco,

 Could you share the details of your solution with me ? 

 I'm trying to build a very specific that is intended to run on only one 
device.
 I need the javax.naming classes required by a library...

and whatever the warning I just want to give it a try ;)

Thanks,
Thomas.



On Tuesday, March 31, 2009 2:02:34 PM UTC+2, Marco Schmitz wrote:

 hello you all, and thanks for your answers. 

 it is like dan bornstein wrote: I tried to integrate 
 java.beans.PropertyChangeListener and java.beans.PropertyChangeEvent 
 into my eclipse android project and got the dx error. 

 I played around with that android-sdk/tools/activitycreator and succeeded. 

 Right now I use the build.xml (ant script) to compile, reinstall and 
 debug my activity with included PropertyChangeListener and 
 PropertyChangeEvent. 

 I imported that project into eclipse in order to start the build.xml from 
 there. 

 I had to check off build automatically. 

 So right now I am using Eclipse as a texteditor and to trigger that ant 
 script. 

 To be more comfortable I'd like to add that parameter --core-library 
 to eclipse / dex. 

 is this possible somehow? 

 greetings, 
 darolla 


 2009/3/30 Mark Murphy mmu...@commonsware.com javascript:: 
  
  Dan Bornstein wrote: 
  Maybe it needs some further wordsmithing. 
  
  As another for instance of this error, I am working on Android-ifying 
  some existing Java code that relies on java.beans.PropertyChangeListener 
  and java.beans.PropertyChangeEvent. I can pull those files out of Apache 
  Harmony, and they are nicely self-contained -- PropertyChangeEvent 
  references PropertyChangeListener, but everything else they use are 
  supplied by Android. 
  
  When I tried putting src/java/beans/PropertyChangeEvent.java and 
  src/java/beans/PropertyChangeListener.java in my source tree, though, I 
  triggered the --core-library error message from dx. 
  
  In particular, dx 
  rejects the definition of classes in namespaces which are already used 
  by classes in the standard boot classpath or are likely to be defined 
  in future incarnations of the platform. 
  
  The problem is that you put us out here in a bind: we can't use your 
  classes (because they are not in the SDK) and you won't let us use our 
  edition of those classes. 
  
  I would recommend the --core-library dx error message have a link to 
  some documentation page where this gets spelled out, so we know what to 
  expect. In particular, a list of the prohibited namespaces would be 
  handy, so we don't have to just guess what we can and cannot use. 
  
  FYI, I have filed this in the issue tracker as: 
  
  http://code.google.com/p/android/issues/detail?id=2329 
  
  -- 
  Mark Murphy (a Commons Guy) 
  http://commonsware.com | http://twitter.com/commonsguy 
  
  _The Busy Coder's Guide to Android Development_ Version 2.0 Available! 
  
   
  


-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Re: how to add --core-library to Eclipse ?

2009-03-31 Thread Marco Schmitz

hello you all, and thanks for your answers.

it is like dan bornstein wrote: I tried to integrate
java.beans.PropertyChangeListener and java.beans.PropertyChangeEvent
into my eclipse android project and got the dx error.

I played around with that android-sdk/tools/activitycreator and succeeded.

Right now I use the build.xml (ant script) to compile, reinstall and
debug my activity with included PropertyChangeListener and
PropertyChangeEvent.

I imported that project into eclipse in order to start the build.xml from there.

I had to check off build automatically.

So right now I am using Eclipse as a texteditor and to trigger that ant script.

To be more comfortable I'd like to add that parameter --core-library
to eclipse / dex.

is this possible somehow?

greetings,
darolla


2009/3/30 Mark Murphy mmur...@commonsware.com:

 Dan Bornstein wrote:
 Maybe it needs some further wordsmithing.

 As another for instance of this error, I am working on Android-ifying
 some existing Java code that relies on java.beans.PropertyChangeListener
 and java.beans.PropertyChangeEvent. I can pull those files out of Apache
 Harmony, and they are nicely self-contained -- PropertyChangeEvent
 references PropertyChangeListener, but everything else they use are
 supplied by Android.

 When I tried putting src/java/beans/PropertyChangeEvent.java and
 src/java/beans/PropertyChangeListener.java in my source tree, though, I
 triggered the --core-library error message from dx.

 In particular, dx
 rejects the definition of classes in namespaces which are already used
 by classes in the standard boot classpath or are likely to be defined
 in future incarnations of the platform.

 The problem is that you put us out here in a bind: we can't use your
 classes (because they are not in the SDK) and you won't let us use our
 edition of those classes.

 I would recommend the --core-library dx error message have a link to
 some documentation page where this gets spelled out, so we know what to
 expect. In particular, a list of the prohibited namespaces would be
 handy, so we don't have to just guess what we can and cannot use.

 FYI, I have filed this in the issue tracker as:

 http://code.google.com/p/android/issues/detail?id=2329

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://twitter.com/commonsguy

 _The Busy Coder's Guide to Android Development_ Version 2.0 Available!

 


--~--~-~--~~~---~--~~
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] Re: how to add --core-library to Eclipse ?

2009-03-31 Thread Dan Bornstein

On Mon, Mar 30, 2009 at 11:09 AM, Mark Murphy
mmur...@commonsware.com wrote:
 When I tried putting src/java/beans/PropertyChangeEvent.java and
 src/java/beans/PropertyChangeListener.java in my source tree, though, I
 triggered the --core-library error message from dx.

It seems like there's a lot of legacy code that wants to use
java.beans, since we regularly hear about people wanting to import
something-or-other that depends on it.

 The problem is that you put us out here in a bind: we can't use your
 classes (because they are not in the SDK) and you won't let us use our
 edition of those classes.

I sympathize with your cause, but there are solutions:

In the short term, I recommend repackaging the classes in question so
they are in your app's package namespace. It's a minor pain, I admit,
but it will solve the problem. You might also investigate whether you
can excise the references to java.beans entirely from the code you
import.

In the long term, Android should probably provide at least a partial
implementation of java.beans. I don't believe it is feasible to
provide a full implementation, as some classes in java.beans reference
UI classes in java.awt that aren't reasonable to have on Android
within the foreseeable future.

 I would recommend the --core-library dx error message have a link to
 some documentation page where this gets spelled out, so we know what to
 expect. In particular, a list of the prohibited namespaces would be
 handy, so we don't have to just guess what we can and cannot use.

Glibly, java.* and javax.*. dx is actually somewhat lenient with
regard to javax, since the nominal mandate for that top-level
package is that it is for extensions which are often packaged
separately from the runtime. However, I would always err on the side
of repackaging. That said, you can find the actual list of verboten
javax packages in the source for dx. And *that* said, for your
convenience, here is the list as it currently stands:

accessibility crypto imageio management naming
net print rmi security sound sql swing transaction
xml

I ended up augmenting the error message yesterday (in an Android-
internal branch for longer-term work, not Cupcake), though it perhaps
could still use a bit more work. We'll get there!

-dan

--~--~-~--~~~---~--~~
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] Re: how to add --core-library to Eclipse ?

2009-03-30 Thread Dan Bornstein

On Thu, Mar 26, 2009 at 9:43 AM, DaRolla
netzprofi.ma...@googlemail.com wrote:
 I need to know how to add the parameter --core-library to Eclipse,
 especially to DEX.

 I managed to work around with activitycreator and ant scripts
 (build.xml), but this way it takes too long.

 Where can I configure this?

As far as I know, it is not currently configurable.

Given that you posted this to android-developers, I assume you are
trying to develop an application and are not working on the platform
code per se. If so, then --core-library is almost certainly *not*
what you want to do. This aspect of dx is written to protect app
developers from inadvertently introducing platform incompatibilities
which will cause their apps to fail to operate. In particular, dx
rejects the definition of classes in namespaces which are already used
by classes in the standard boot classpath or are likely to be defined
in future incarnations of the platform.

Maybe if you can be a bit more specific about what you're actually
trying to accomplish, someone here can provide you a suitable
alternative.

To save the curious some trouble, here's the error message Marco got:

Attempt to include a core VM class in something other than a core
library.
It is likely that you have attempted to include the core library
from a desktop
virtual machine into an application, which will most assuredly not
work. If
you really intend to build a core library -- which is only
appropriate as
part of creating a full virtual machine binary, as opposed to
compiling an
application -- then use the --core-library option to suppress
this error
message. If you go ahead and use --core-library but are in fact
building
an application, then please be aware that your build will still
fail at some
point; you will simply be denied the pleasure of reading this
helpful error
message.

Maybe it needs some further wordsmithing.

-dan

--~--~-~--~~~---~--~~
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] Re: how to add --core-library to Eclipse ?

2009-03-29 Thread Marco Schmitz

is there noone who can help me on this?

2009/3/26 DaRolla netzprofi.ma...@googlemail.com:
 hi,

 I need to know how to add the parameter --core-library to Eclipse,
 especially to DEX.

 I managed to work around with activitycreator and ant scripts
 (build.xml), but this way it takes too long.

 Where can I configure this?

 Thanks,
 DaRolla

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---