After a while I decided to try out Oxygene again to develop for Android.
Unfortunately, what worked before does not anymore. I get the error
(AP1) Error while running Android tool: dx.bat
I assume this has to do with the Java configuration. I recently had to uninstall a previous Java version which had severe security issues. I am now using 1.8.0.45 but I also tried an older one. The error is always there.
I uninstalled Elements and VS, reinstalled it. Installed SDK and the latest Elements (beta - 8.1.82.1741).
I have several sdks, in build tools I have 19, 20, 21 and 22. Unfortunately the error message remains.
Is there a way to test the prerequisites for using elements?
Does anybody have a tip what else I can try out to make it work again? Thanks!
Can you try running dx.bat manually, see if any errors show up?
Oxygene should detect Java and Android as prerequisites properly, so this this must be something else.
Thanks for the tip. I tried that in cmd and got:
C:\Eclipse\sdk\build-tools\21.1.2>dx.bat
Error occurred during initialization of VM
Could not reserve enough space for 1048576KB object heap
I reinstalled the 64bit JAVA and made sure JAVE_HOME points to
C:\Eclipse\jdk1.8.0_45_x64
and voilĂ - dx.bat produces a list of arguments instead of the error above.
Unfortunately the error in VS remained and, after I closed it and opened it I get this error immediately. The splashscreen of VS was just showing up.
Microsoft Visual Studio
Exception has been thrown by the target of an invocation.
I had that error yesterday (but not always) also and will now reboot to try if that fixes it.
After rebooting the message âException has been thrown by the target of an invocation.â was gone - but I am back at â(AP1) Error while running Android tool: dx.batâ and 9 warnings. (I am trying the HelloWorld sample)
In my Systemcontrol I have a âJavaâ item, I cannot see it is 64bit or not. So I deinstalled all Java entries from my system except for Java 64 bit and Java Development Kit 64 bit to make sure it uses the correct.
Microsoft Visual Studio: Exception has been thrown by the target of an invocation.
and later
Microsoft Visual Studio: The âMRU Packageâ package did not load correctly.
Visual Studio 2010 did not run either.
I did reboot, selected the 5.2 .NET Framework in âSoftwareâ and did a repair run. I also selected the Visual Studio 2013 Integrated and did a repair run.
I checked my System / Search Path - it was too long. I cleaned it up and shortened it by using %VAR% to replace longer directories.
Now VS 2010 works alright at VS 2013 starts again.
I can open âHello Worldâ and compile. One warning is shown this time and one error
Warning 1 () C:\Users\Public\Documents\RemObjects Samples\Oxygene for Java\Android\HelloWorld\obj\Debug\res\drawable-ldpi\icon.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\Public\Documents\RemObjects Samples\Oxygene for Java\Android\HelloWorld\obj\Debug\res\drawable-mdpi\icon.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\Public\Documents\RemObjects Samples\Oxygene for Java\Android\HelloWorld\obj\Debug\res\drawable-hdpi\icon.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Program Files (x86)\MSBuild\RemObjects Software\Oxygene\RemObjects.Oxygene.Cooper.Android.targets 0 0 org.me.helloworld
Both this messages show up in other projects, too.
Is it possible that some items were not written to PATH because it was too long? Does Elements require any settings, i.e. C:\Program Files (x86)\RemObjects Software\Everwood\Bin ?
This is a fresh install of âRemObjects+Elements+with+Visual+Studio+2013±+8.0.81.1667.exeâ downloaded in February which used to work fine.
BTW - is it required that âC:\Program Files (x86)\RemObjects Software\Everwood\Binâ is in the search path?
The Target Invokation Exception appeared to be a .NET problem which was probably introduced by an error in the installation. I do not get it right now after removing a duplicated âgermanâ .NET 4.5 and repairing the other.
I have Everwood in the path now (I also used a variable to shorten the string. The length of the path is restricted, nevertheless many programs add very long items to it).
But nothing has changed with the dx.bat error.
The output window contains:
------ Build started: Project: org.me.helloworld, Configuration: Debug ------
JDKRoot:C:\Eclipse\jdk1.8.0_45_x64
JRERoot:C:\Program Files (x86)\Java\jre8
C:\Program Files (x86)\MSBuild\RemObjects Software\Oxygene\RemObjects.Oxygene.Cooper.Android.targets(0,0): warning : C:\Users\Public\Documents\RemObjects Samples\Oxygene for Java\Android\HelloWorld\obj\Debug\res\drawable-ldpi\icon.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\Public\Documents\RemObjects Samples\Oxygene for Java\Android\HelloWorld\obj\Debug\res\drawable-mdpi\icon.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
C:\Users\Public\Documents\RemObjects Samples\Oxygene for Java\Android\HelloWorld\obj\Debug\res\drawable-hdpi\icon.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
org.me.helloworld -> C:\Users\Public\Documents\RemObjects Samples\Oxygene for Java\Android\HelloWorld\bin\Debug\org.me.helloworld.jar
C:\Program Files (x86)\MSBuild\RemObjects Software\Oxygene\RemObjects.Oxygene.Cooper.Android.targets(96,5): error AP1: Error while running Android tool: dx.bat
Done building project âorg.me.helloworld.oxygeneâ â FAILED.
Run: "C:\Program Files (x86)\Java\jre8\bin\java.exe" -Xmx1024M -jar "C:\Eclipse\sdk\build-tools\22.0.1\lib\dx.jar" --dex --verbose --output="C:\Users\Public\Documents\RemObjects Samples\Oxygene for Java\Android\HelloWorld\obj\Debug\classes.dex" --positions=lines "C:\Users\Public\Documents\RemObjects Samples\Oxygene for Java\Android\HelloWorld\obj\Debug\org.me.helloworld.jar"
Error occurred during initialization of VM
Could not reserve enough space for 1048576KB object heap
C:\Program Files (x86)\MSBuild\RemObjects Software\Oxygene\RemObjects.Oxygene.Cooper.Android.targets(96,5): error AP1: Error while running Android tool: dx.bat
Done building project âorg.me.helloworld.oxygeneâ â FAILED.
I renamed the old 32bit Java directory and get - unsurprisingly - this message:
Error 1 (CP2) Paths to the Java SDK (JDK) and/or the Java Runtime Environment (JRE) are configured, but one or more of the paths were not found on disk. Please make sure the paths are correct. If you need help reinstalling Java, visit http://docs.elementscompiler.com//VisualStudio/Setup/JDK/. C:\Program Files (x86)\MSBuild\RemObjects Software\Oxygene\RemObjects.Oxygene.Cooper.Common.targets 59 5 org.me.helloworld