[android-developers] Re: Conversion to Dalvik format failed with error 2

2008-07-05 Thread Oscar Castaneda
Hi Taras,

I think you're right, but I find weird since I have retrotranslated all
classes using the backport and target options. This is how I'm running
retrotranslator now:

$ java -jar
../Retrotranslator-1.2.6-bin/retrotranslator-transformer-1.2.6.jar -srcdir
srcdir -backport java.rmi.Remote:java.lang.Cloneable -target 1.5 -reflection
safe -stripannot -embed . -classpath
../Retrotranslator-1.2.6-bin/retrotranslator-android-1.2.6.jar -verbose

Just to double check I rebuilt my workspace and ran retrotranslator again as
shown above. I don't get any errors when running retrotranslator [1] [2] but
still get the same errors when running the calculator-android project. Also,
I checked the sizes of the translated classes and found that they are not
becoming much bigger [3] [4]. Do you think I'm missing something?

Thank you so much for all your help.

[1] http://androidindelft.googlepages.com/tuscany_android_retr_output.txt
[2] http://androidindelft.googlepages.com/tuscany_rev_retr_output.txt
[3] http://androidindelft.googlepages.com/5Jul_retrotranslated.jpg
[4] http://androidindelft.googlepages.com/5Jul_NOTtranslated.jpg


On Thu, Jul 3, 2008 at 3:44 PM, Taras Puchko [EMAIL PROTECTED] wrote:

 Hi Oscar,

 It looks like Retrotranslator haven't translated the ConversationProcessor
 class if you see the following stack trace:

 java.lang.UnsupportedOperationException: native method not implemented
   at java.lang.Class.getDeclaredAnnotations(Native Method)
   at java.lang.Class.getAnnotations(Class.java:204)
   at java.lang.Class.getAnnotation(Class.java:187)
   at
 org.apache.tuscany.sca.implementation.java.introspect.impl.ConversationProcessor.visitClass(ConversationProcessor.java:49)

 Check the size of the translated class, it should become one third bigger.

 If you need backport-util-concurrent-3.1.jar you have probably run
 Retrotranslator without specifying -target 1.5. Always use -target 1.5
 and -classpath retrotranslator-android-1.2.6.jar even if repeatedly
 translating classes. However I recommend to translate code in one pass.


 Cheers,

 Taras



 On Thu, Jul 3, 2008 at 3:45 PM, Oscar Castaneda 
 [EMAIL PROTECTED] wrote:

 Hi Taras,

 Thanks for your help. I tried the -backport option on the previously
 retrotranslated classes and received some errors that were resolved by
 including backport-util-concurrent-3.1.jar. After that I was getting some
 errors related to getAnnotation [1] so I tried building all the projects
 from scratch and running retrotranslator again together with the -backport
 option. Now I'm getting UnsupportedOperationException errors [2]. Any advice
 you can give me will be greatly appreciated.

 [1] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/30Jun2008
 [2] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jul2008


 On Thu, Jun 19, 2008 at 1:06 PM, Taras Puchko [EMAIL PROTECTED]
 wrote:

 I'm glad Retrotrotranslator works for you Oscar. If you just want to get
 rid of java.rmi.Remote you may replace it with java.lang.Cloneable using the
 folowing Retrotranslator option:

 -backport java.rmi.Remote:java.lang.Cloneable

 But in case you have some important code using the java.rmi package you
 may try to take sources of java.rmi from the Apache Harmony.
 Then move the sources into another package, so you'll have, for example,
 mypack.java.rmi, compile and jar them. After that you may use it with
 Retrotranslator:

 -backport mypack -classpath mypack.jar

 But this approach works only if the sources don't employ native code :)

 Cheers,
 Taras.


 On Wed, Jun 18, 2008 at 10:41 PM, Oscar Castaneda 
 [EMAIL PROTECTED] wrote:

 Thanks again for all your help Taras. After following your suggestion
 and adding retrotranslator-android-1.2.6.jar as an external library (as
 opposed to an external _user_ library) the retrotranslator related errors
 disappeared. I'm now receiving errors about java.rmi.Remote [1], which from
 what I could find is not supported in Android. I just thought I'd mention 
 it
 in case you have any suggestions :-)

 I will respond also on the Android Developer list as someone else might
 find this useful. By mistake I sent the email only to you which I think
 resulted in me being the only recipient of your response.

 Again, thanks for all your help.

 [1] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/18Jun2008


 On Tue, Jun 17, 2008 at 11:05 PM, [EMAIL PROTECTED] wrote:

 I forgot to mention that you can use the embed option making inclusion
 of retrotranslator-android-1.2.6.jar into the compile path redundant.

 So you can add -embed a single dot or any package name:

 java -jar
 ../Retrotranslator-1.2.6-bin/retrotranslator-transformer-1.2.6.jar
 -srcdir ../workspace -target 1.5 -reflection safe -stripannot -embed .
 -classpath
 ../Retrotranslator-1.2.6-bin/retrotranslator-android-1.2.6.jar
 -verbose

 On 6/17/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  Hi Oscar,
 
  Unfortunately I cannot open the TUSCANY wiki at the moment but 

[android-developers] Re: Conversion to Dalvik format failed with error 2

2008-07-05 Thread taras . puchko
Hi Oscar,

The command line looks OK, but the embed option cannot be used there
since your srcdir does not point to the root package of your classes.
So don't use this option but add retrotranslator-android-1.2.6.jar to
your project instead. If the problem persists point srcdir exectly to
the root package (e.g. -srcdir
tuscany_android/mobile-android/calculator-android/bin)

BTW, the size of your classes must change significantly. I have
translated QName.class from Xalan-J and its size increased from 2827
to 4083 bytes.

Regards,
Taras

On 7/5/08, Oscar Castaneda [EMAIL PROTECTED] wrote:
 Hi Taras,

 I think you're right, but I find weird since I have retrotranslated all
 classes using the backport and target options. This is how I'm running
 retrotranslator now:

 $ java -jar
 ../Retrotranslator-1.2.6-bin/retrotranslator-transformer-1.2.6.jar -srcdir
 srcdir -backport java.rmi.Remote:java.lang.Cloneable -target 1.5 -reflection
 safe -stripannot -embed . -classpath
 ../Retrotranslator-1.2.6-bin/retrotranslator-android-1.2.6.jar -verbose

 Just to double check I rebuilt my workspace and ran retrotranslator again as
 shown above. I don't get any errors when running retrotranslator [1] [2] but
 still get the same errors when running the calculator-android project. Also,
 I checked the sizes of the translated classes and found that they are not
 becoming much bigger [3] [4]. Do you think I'm missing something?

 Thank you so much for all your help.

 [1] http://androidindelft.googlepages.com/tuscany_android_retr_output.txt
 [2] http://androidindelft.googlepages.com/tuscany_rev_retr_output.txt
 [3] http://androidindelft.googlepages.com/5Jul_retrotranslated.jpg
 [4] http://androidindelft.googlepages.com/5Jul_NOTtranslated.jpg


 On Thu, Jul 3, 2008 at 3:44 PM, Taras Puchko [EMAIL PROTECTED] wrote:

 Hi Oscar,

 It looks like Retrotranslator haven't translated the ConversationProcessor
 class if you see the following stack trace:

 java.lang.UnsupportedOperationException: native method not implemented
   at java.lang.Class.getDeclaredAnnotations(Native Method)
   at java.lang.Class.getAnnotations(Class.java:204)
   at java.lang.Class.getAnnotation(Class.java:187)
   at
 org.apache.tuscany.sca.implementation.java.introspect.impl.ConversationProcessor.visitClass(ConversationProcessor.java:49)

 Check the size of the translated class, it should become one third bigger.

 If you need backport-util-concurrent-3.1.jar you have probably run
 Retrotranslator without specifying -target 1.5. Always use -target 1.5
 and -classpath retrotranslator-android-1.2.6.jar even if repeatedly
 translating classes. However I recommend to translate code in one pass.


 Cheers,

 Taras



 On Thu, Jul 3, 2008 at 3:45 PM, Oscar Castaneda 
 [EMAIL PROTECTED] wrote:

 Hi Taras,

 Thanks for your help. I tried the -backport option on the previously
 retrotranslated classes and received some errors that were resolved by
 including backport-util-concurrent-3.1.jar. After that I was getting some
 errors related to getAnnotation [1] so I tried building all the projects
 from scratch and running retrotranslator again together with the
 -backport
 option. Now I'm getting UnsupportedOperationException errors [2]. Any
 advice
 you can give me will be greatly appreciated.

 [1] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/30Jun2008
 [2] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jul2008


 On Thu, Jun 19, 2008 at 1:06 PM, Taras Puchko [EMAIL PROTECTED]
 wrote:

 I'm glad Retrotrotranslator works for you Oscar. If you just want to get
 rid of java.rmi.Remote you may replace it with java.lang.Cloneable using
 the
 folowing Retrotranslator option:

 -backport java.rmi.Remote:java.lang.Cloneable

 But in case you have some important code using the java.rmi package you
 may try to take sources of java.rmi from the Apache Harmony.
 Then move the sources into another package, so you'll have, for example,
 mypack.java.rmi, compile and jar them. After that you may use it with
 Retrotranslator:

 -backport mypack -classpath mypack.jar

 But this approach works only if the sources don't employ native code :)

 Cheers,
 Taras.


 On Wed, Jun 18, 2008 at 10:41 PM, Oscar Castaneda 
 [EMAIL PROTECTED] wrote:

 Thanks again for all your help Taras. After following your suggestion
 and adding retrotranslator-android-1.2.6.jar as an external library (as
 opposed to an external _user_ library) the retrotranslator related
 errors
 disappeared. I'm now receiving errors about java.rmi.Remote [1], which
 from
 what I could find is not supported in Android. I just thought I'd
 mention it
 in case you have any suggestions :-)

 I will respond also on the Android Developer list as someone else might
 find this useful. By mistake I sent the email only to you which I think
 resulted in me being the only recipient of your response.

 Again, thanks for all your help.

 [1] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/18Jun2008


 On Tue, Jun 17, 

[android-developers] Re: Conversion to Dalvik format failed with error 2

2008-07-03 Thread Taras Puchko
Hi Oscar,

It looks like Retrotranslator haven't translated the ConversationProcessor
class if you see the following stack trace:

java.lang.UnsupportedOperationException: native method not implemented
  at java.lang.Class.getDeclaredAnnotations(Native Method)
  at java.lang.Class.getAnnotations(Class.java:204)
  at java.lang.Class.getAnnotation(Class.java:187)
  at
org.apache.tuscany.sca.implementation.java.introspect.impl.ConversationProcessor.visitClass(ConversationProcessor.java:49)

Check the size of the translated class, it should become one third bigger.

If you need backport-util-concurrent-3.1.jar you have probably run
Retrotranslator without specifying -target 1.5. Always use -target 1.5
and -classpath retrotranslator-android-1.2.6.jar even if repeatedly
translating classes. However I recommend to translate code in one pass.


Cheers,

Taras


On Thu, Jul 3, 2008 at 3:45 PM, Oscar Castaneda 
[EMAIL PROTECTED] wrote:

 Hi Taras,

 Thanks for your help. I tried the -backport option on the previously
 retrotranslated classes and received some errors that were resolved by
 including backport-util-concurrent-3.1.jar. After that I was getting some
 errors related to getAnnotation [1] so I tried building all the projects
 from scratch and running retrotranslator again together with the -backport
 option. Now I'm getting UnsupportedOperationException errors [2]. Any advice
 you can give me will be greatly appreciated.

 [1] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/30Jun2008
 [2] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jul2008


 On Thu, Jun 19, 2008 at 1:06 PM, Taras Puchko [EMAIL PROTECTED]
 wrote:

 I'm glad Retrotrotranslator works for you Oscar. If you just want to get
 rid of java.rmi.Remote you may replace it with java.lang.Cloneable using the
 folowing Retrotranslator option:

 -backport java.rmi.Remote:java.lang.Cloneable

 But in case you have some important code using the java.rmi package you
 may try to take sources of java.rmi from the Apache Harmony.
 Then move the sources into another package, so you'll have, for example,
 mypack.java.rmi, compile and jar them. After that you may use it with
 Retrotranslator:

 -backport mypack -classpath mypack.jar

 But this approach works only if the sources don't employ native code :)

 Cheers,
 Taras.


 On Wed, Jun 18, 2008 at 10:41 PM, Oscar Castaneda 
 [EMAIL PROTECTED] wrote:

 Thanks again for all your help Taras. After following your suggestion and
 adding retrotranslator-android-1.2.6.jar as an external library (as opposed
 to an external _user_ library) the retrotranslator related errors
 disappeared. I'm now receiving errors about java.rmi.Remote [1], which from
 what I could find is not supported in Android. I just thought I'd mention it
 in case you have any suggestions :-)

 I will respond also on the Android Developer list as someone else might
 find this useful. By mistake I sent the email only to you which I think
 resulted in me being the only recipient of your response.

 Again, thanks for all your help.

 [1] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/18Jun2008


 On Tue, Jun 17, 2008 at 11:05 PM, [EMAIL PROTECTED] wrote:

 I forgot to mention that you can use the embed option making inclusion
 of retrotranslator-android-1.2.6.jar into the compile path redundant.

 So you can add -embed a single dot or any package name:

 java -jar
 ../Retrotranslator-1.2.6-bin/retrotranslator-transformer-1.2.6.jar
 -srcdir ../workspace -target 1.5 -reflection safe -stripannot -embed .
 -classpath
 ../Retrotranslator-1.2.6-bin/retrotranslator-android-1.2.6.jar
 -verbose

 On 6/17/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  Hi Oscar,
 
  Unfortunately I cannot open the TUSCANY wiki at the moment but it
 looks like
  the contents of retrotranslator-android-1.2.6.jar hasn't been included
 into
  the dex file. Try to explicitly refer to it in your code, for
 instance, call
 
 net.sf.retrotranslator.android.main.java.lang._Class.cast(String.class,
  test);
 
  And you needn't use the 1.4 target - only using the 1.5 one makes
 sense for
  Android.
 
  Cheers,
  Taras.
 
 
  On 6/17/08, Oscar Castaneda [EMAIL PROTECTED] wrote:
  Hi Taras,
 
  Thank you so much for the detailed response.
 
  I think you're right that when I run the Android project from Eclipse
 it
  both compiles the sources into classes and the classes into a dex
 file. I
  also agree that the most elegant way would be to add the translation
 step
  to
  the ADT plugin source code, thus enabling users to run
 Retrotranslator on
  the sources from within Eclipse. In some cases, such as mine, this is
  preferred over manually translating libraries that contain
 annotations and
  then adding them to the the main project (for instance, to simplify
  debugging).
 
  There is a workaround to prevent classes that have already been
 translated
  by Retrotranslator to be recompiled from source. The workaround is to
  disable the Java Builders from 

[android-developers] Re: Conversion to Dalvik format failed with error 2

2008-06-19 Thread Taras Puchko
I'm glad Retrotrotranslator works for you Oscar. If you just want to get rid
of java.rmi.Remote you may replace it with java.lang.Cloneable using the
folowing Retrotranslator option:

-backport java.rmi.Remote:java.lang.Cloneable

But in case you have some important code using the java.rmi package you may
try to take sources of java.rmi from the Apache Harmony.
Then move the sources into another package, so you'll have, for example,
mypack.java.rmi, compile and jar them. After that you may use it with
Retrotranslator:

-backport mypack -classpath mypack.jar

But this approach works only if the sources don't employ native code :)

Cheers,
Taras.

On Wed, Jun 18, 2008 at 10:41 PM, Oscar Castaneda 
[EMAIL PROTECTED] wrote:

 Thanks again for all your help Taras. After following your suggestion and
 adding retrotranslator-android-1.2.6.jar as an external library (as opposed
 to an external _user_ library) the retrotranslator related errors
 disappeared. I'm now receiving errors about java.rmi.Remote [1], which from
 what I could find is not supported in Android. I just thought I'd mention it
 in case you have any suggestions :-)

 I will respond also on the Android Developer list as someone else might
 find this useful. By mistake I sent the email only to you which I think
 resulted in me being the only recipient of your response.

 Again, thanks for all your help.

 [1] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/18Jun2008


 On Tue, Jun 17, 2008 at 11:05 PM, [EMAIL PROTECTED] wrote:

 I forgot to mention that you can use the embed option making inclusion
 of retrotranslator-android-1.2.6.jar into the compile path redundant.

 So you can add -embed a single dot or any package name:

 java -jar
 ../Retrotranslator-1.2.6-bin/retrotranslator-transformer-1.2.6.jar
 -srcdir ../workspace -target 1.5 -reflection safe -stripannot -embed .
 -classpath ../Retrotranslator-1.2.6-bin/retrotranslator-android-1.2.6.jar
 -verbose

 On 6/17/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  Hi Oscar,
 
  Unfortunately I cannot open the TUSCANY wiki at the moment but it looks
 like
  the contents of retrotranslator-android-1.2.6.jar hasn't been included
 into
  the dex file. Try to explicitly refer to it in your code, for instance,
 call
  net.sf.retrotranslator.android.main.java.lang._Class.cast(String.class,
  test);
 
  And you needn't use the 1.4 target - only using the 1.5 one makes sense
 for
  Android.
 
  Cheers,
  Taras.
 
 
  On 6/17/08, Oscar Castaneda [EMAIL PROTECTED] wrote:
  Hi Taras,
 
  Thank you so much for the detailed response.
 
  I think you're right that when I run the Android project from Eclipse
 it
  both compiles the sources into classes and the classes into a dex file.
 I
  also agree that the most elegant way would be to add the translation
 step
  to
  the ADT plugin source code, thus enabling users to run Retrotranslator
 on
  the sources from within Eclipse. In some cases, such as mine, this is
  preferred over manually translating libraries that contain annotations
 and
  then adding them to the the main project (for instance, to simplify
  debugging).
 
  There is a workaround to prevent classes that have already been
 translated
  by Retrotranslator to be recompiled from source. The workaround is to
  disable the Java Builders from within each project's properties. I
 tried
  this and no longer receive the Annotation error:
 
  java.lang.Class.isAnnotationPresent(Class.java:1131)
 
  However, I'm getting the error shown below (and listed on the full
 stack
  trace in [1]). I took care to include retrotranslator-android-1.2.6.jar
 as
  an external library to all Tuscany projects, including
 calculator-android,
  as you pointed out. Additionally, I confirmed through the timestamps on
  class files and dex file that retrotranslated classes are not being
  recompiled and that the dex file was generated a few minutes after
 running
  retrotranslator.
 
  java.lang.NoClassDefFoundError:
  net.sf.retrotranslator.android.main.java.lang._Class
 
  I've tried this running retrotranslator as shown below, setting the
 target
  to java 1.5 at first and then to 1.4.
 
  $ java -jar
  /../Retrotranslator-1.2.6-bin/retrotranslator-transformer-1.2.6.jar
  -srcdir
  /../workspace -target 1.5 -reflection safe -stripannot -classpath
  /../Retrotranslator-1.2.6-bin/retrotranslator-android-1.2.6.jar
 -verbose
 
  What could be going wrong? Any suggestions would be greatly
 appreciated.
 
  [1] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/14Jun2008
 
 
 
  On Wed, Jun 4, 2008 at 6:44 PM, Taras Puchko [EMAIL PROTECTED]
  wrote:
 
  Hi Oscar,
 
  Retrotranslator does it's job by modifying compiled classes in the
  following way:
  1. Embedding into each class its metadata (including annotations) as
 one
  big character string.
  2. Replacing some method invocations, so
  java.lang.Class.isAnnotationPresent is being replaced with
 
 

[android-developers] Re: Conversion to Dalvik format failed with error 2

2008-06-18 Thread Oscar Castaneda
Hi Taras,

Thanks for your help. I think your suggestions resolved the problem, even
though I'm getting other errors now. By mistake I sent the email only to you
which I think resulted in me being the only recipient of your response. I
include your response and my follow-up below, as someone else might find
this useful.

Unfortunately I cannot open the TUSCANY wiki at the moment but it looks like
 the contents of retrotranslator-android-1.2.6.jar hasn't been included
 into the dex file. Try to explicitly refer to it in your code, for instance,
 call
 net.sf.retrotranslator.android.main.java.lang._Class.cast(String.class,
 test);

 And you needn't use the 1.4 target - only using the 1.5 one makes sense for
 Android.



I forgot to mention that you can use the embed option making inclusion
 of retrotranslator-android-1.2.6.jar into the compile path redundant.

 So you can add -embed a single dot or any package name:

 java -jar
 ../Retrotranslator-1.2.6-bin/retrotranslator-transformer-1.2.6.jar
 -srcdir ../workspace -target 1.5 -reflection safe -stripannot -embed .
 -classpath ../Retrotranslator-1.2.6-bin/retrotranslator-android-1.2.6.jar
 -verbose


After following your suggestion and adding retrotranslator-android-1.2.6.jar
as an external library (as opposed to an external _user_ library) the
retrotranslator related errors disappeared. I'm now receiving errors about
java.rmi.Remote [1], which from what I could find is not supported in
Android. I just thought I'd mention it in case you have any suggestions :-)



On Tue, Jun 17, 2008 at 8:16 PM, Oscar Castaneda 
[EMAIL PROTECTED] wrote:

 Hi Taras,

 Thank you so much for the detailed response.

 I think you're right that when I run the Android project from Eclipse it
 both compiles the sources into classes and the classes into a dex file. I
 also agree that the most elegant way would be to add the translation step to
 the ADT plugin source code, thus enabling users to run Retrotranslator on
 the sources from within Eclipse. In some cases, such as mine, this is
 preferred over manually translating libraries that contain annotations and
 then adding them to the the main project (for instance, to simplify
 debugging).

 There is a workaround to prevent classes that have already been translated
 by Retrotranslator to be recompiled from source. The workaround is to
 disable the Java Builders from within each project's properties. I tried
 this and no longer receive the Annotation error:

 java.lang.Class.isAnnotationPresent(Class.java:1131)

 However, I'm getting the error shown below (and listed on the full stack
 trace in [1]). I took care to include retrotranslator-android-1.2.6.jar as
 an external library to all Tuscany projects, including calculator-android,
 as you pointed out. Additionally, I confirmed through the timestamps on
 class files and dex file that retrotranslated classes are not being
 recompiled and that the dex file was generated a few minutes after running
 retrotranslator.

 java.lang.NoClassDefFoundError:
 net.sf.retrotranslator.android.main.java.lang._Class

 I've tried this running retrotranslator as shown below, setting the target
 to java 1.5 at first and then to 1.4.

 $ java -jar
 /../Retrotranslator-1.2.6-bin/retrotranslator-transformer-1.2.6.jar -srcdir
 /../workspace -target 1.5 -reflection safe -stripannot -classpath
 /../Retrotranslator-1.2.6-bin/retrotranslator-android-1.2.6.jar -verbose

 What could be going wrong? Any suggestions would be greatly appreciated.

 [1] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/14Jun2008



 On Wed, Jun 4, 2008 at 6:44 PM, Taras Puchko [EMAIL PROTECTED]
 wrote:

 Hi Oscar,

 Retrotranslator does it's job by modifying compiled classes in the
 following way:
 1. Embedding into each class its metadata (including annotations) as one
 big character string.
 2. Replacing some method invocations, so java.lang.Class.isAnnotationPresent 
 is being replaced with
 net.sf.retrotranslator.android.main.java.lang.Class.isAnnotationPresent etc.

 So when you call getAnnotations() on a particular class the code from
 retrotranslator-android-1.2.6.jar will parse the corresponding metadata and
 return the result.

 AFAIK when you run your Android project from Eclipse it both compiles your
 sources into classes and the classes into a dex file. So Retrotranslator has
 no chance to modify classes in between unless you fix the ADT plugin. The
 workaround is not to put your sources into Eclipse and to process it with
 javac, Retrotranslator and jar manually. After that you may add the jar to
 Eclipse.

 If you execute the following line you should obtain mytuscany-android.jar
 that is one-third bigger then the original mytuscany.jar and does not
 contain references to Java 5 reflection methods.

 java -jar retrotranslator-transformer-1.2.6.jar -srcjar mytuscany.jar
 -destjar mytuscany-android.jar  -target 1.5 -reflection safe -stripannot
 -classpath retrotranslator-android-1.2.6.jar

 So the line 

[android-developers] Re: Conversion to Dalvik format failed with error 2

2008-04-03 Thread Taras Puchko

If your application does not declare or use annotations itself you may
translate the dependency before adding it to the Eclipse project:

java -jar retrotranslator-transformer-1.2.6.jar -target 1.5 -embed
support -reflection safe -stripannot -srcjar gdata-media-1.0.jar

Regards,
Taras.

On 28 Бер, 17:18, nwmotogeek [EMAIL PROTECTED] wrote:
 That link describes how to add a target to the build.xml but I don't know
 how to do that with Eclipse can some one point me to instructions on this?

 Thanks,
 -Dave

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Conversion to Dalvik format failed with error 2

2008-04-03 Thread Taras Puchko

I've made a mistake in my previous post, the correct command is the
following:

java -jar retrotranslator-transformer-1.2.6.jar -target 1.5 -
stripannot -embed support -reflection safe -classpath retrotranslator-
android-1.2.6.jar -srcjar gdata-media-1.0.jar

To use annotations in your code extract classes that contain or
manipulate annotations into a separate library, translate it with
Retrotranslator and add it as a dependency to the main project.

Regards,
Taras.

On 3 Кві, 09:42, Taras Puchko [EMAIL PROTECTED] wrote:
 If your application does not declare or use annotations itself you may
 translate the dependency before adding it to the Eclipse project:

 java -jar retrotranslator-transformer-1.2.6.jar -target 1.5 -embed
 support -reflection safe -stripannot -srcjar gdata-media-1.0.jar

 Regards,
 Taras.

 On 28 Бер, 17:18, nwmotogeek [EMAIL PROTECTED] wrote:

  That link describes how to add a target to the build.xml but I don't know
  how to do that with Eclipse can some one point me to instructions on this?

  Thanks,
  -Dave
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Conversion to Dalvik format failed with error 2

2008-04-02 Thread Sebi

its simpler to use a and build-script. I have generated my build.xml
with this tool: http://code.google.com/android/intro/installing.html#otherides
and then added this target http://retrotranslator.sourceforge.net/#android
and it worked fine. Also with eclipse

--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Conversion to Dalvik format failed with error 2

2008-03-25 Thread Adriano Crestani

Yes,

I had a similar problem, when trying to convert Apache Tuscany jars. A
lot of problems with annotations. I only would like that these error
outputs could tell more about the errors :S

Adriano Crestani

On Mar 25, 2:19 am, JuhaK [EMAIL PROTECTED] wrote:
 Hi,

 Gdata API java libraries in general are not directly usable in android
 currently. It's easy to see why, just import the source tree of the
 java lib to your android project and compile. The java annotations
 that are used by the library are not supported by android.

 JuhaK

 On Mar 24, 6:13 pm, nwmotogeek [EMAIL PROTECTED] wrote:

  strange whenever I try to run this command

  dx --dex --verbose --output=gdata-media-dex-1.0.jar gdata-media-1.0.jar

  it processes the calsses found in the jar file but then ends with an error:

  'trouble writing output: not found'

  Any one know what this means?

  Thanks,
  -Dave
  On Sun, Mar 23, 2008 at 5:24 PM, Adriano Crestani [EMAIL PROTECTED]
  wrote:

   It can be found at antroid_sdk_dir/tools/

   You can use the following command to convert your jar:

   dx --dex --output=gmedia.dex gdata-media-1.0.jar

   I'm just wondering how I add the output .dex file on the Android
   Eclipse project. Should it be placed under src directory?

   Regards,
   Adriano

   On Mar 23, 1:26 pm, nwmotogeek [EMAIL PROTECTED] wrote:
Where can I find that tool?

 On Sun, Mar 23, 2008 at 1:21 PM, Dan U. [EMAIL PROTECTED] wrote:

 I'll guess that that jar is just a regular java lib? It probably needs
 converted to dalvik format. You could use the dx tool to convert it.

 On Mar 23, 12:18 pm, nwmotogeek [EMAIL PROTECTED] wrote:
  I get this error when I add the gdata-media-1.0.jar file to my
 Referenced
  Libraries in Eclipse.  when I remove this jar from my build path
   then
 the
  error goes away.  Unfortunetly I need this to interact with the
   Picasa
 Web
  Service.

  I am using the m5-rc15 release of the Android SDK and version 
  1.16.2of
 the
  Google Data API's.

  I know that others are having similar problems with the m5-rc14 sdk
 release
  but i don't understand how their problems relate to mine.

  Any help would be great! thanks.
  -David
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---