From: Dr. A. K. S. <al...@se...> - 2009-12-15 13:03:52
|
There is something very strange going on. I get a major error when initializing a FileInputStream with any resource path (i.e. path obtained by ... String fileName = getFileNamePath(findResourceNameById(resourceId)); String filePath = NSBundle.mainBundle().pathForResource(fileName,"xml"); - I've tested with activity.xml = my layout file and one raw resource) and then instantiating a new FileInputStream object. FileInputStream fis = new FileInputStream(filePath); If filePath does not exist, it gives a FileNotFound exception. If it does exist (e.g. the activity.xml is obviously read during startup), there is a major crash of the whole MacOS - not only the iPhone emulator. I've noted that my icon is not shown as well, so perhaps there is a problem with resources in general. However, my layout xml is pretty basic: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <TextView android:id="@+id/result" android:layout_width="wrap_content" android:layout_height="wrap_content"> </TextView> <Button android:id="@+id/livetest" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/livetest" ></Button> <Button android:id="@+id/back" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/back" ></Button> <Button android:id="@+id/validate" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/validate" android:enabled="true" ></Button> </LinearLayout> ... as well as the AndroidManifest.xml: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.SeewaldSolutions.DanceMusicRecognizer" android:versionCode="1" android:versionName="1.0"> <uses-sdk android:minSdkVersion="3" /> <uses-permission android:name="android.permission.RECORD_AUDIO"></uses-permission> <uses-permission android:name="android.permission.INTERNET"></uses-permission> <application android:label="@string/dancing_guide_app" android:icon="@drawable/launcher"> <activity android:name="DanceMusicRecognizerActivity" android:icon="@drawable/launcher" android:configChanges="orientation"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> I compile using ... javac android_src/src/com/SeewaldSolutions/DanceMusicRecognizer/*.java android_src/gen/com/SeewaldSolutions/DanceMusicRecognizer/R.java -d android_src_build -cp xmlvm/dist/lib/objc-compat.jar:xmlvm/dist/lib/android-compat.jar ... and use xmlvm like this ... java -jar xmlvm/dist/xmlvm.jar --in=android_src_build --out=DanceMusicRecognizer --target=android-on-iphone --iphone-app=DanceMusicRecognizer --resource=android_src/res/layout --resource=android_src/res/raw --resource=android_src/res/drawable --resource=android_src/AndroidManifest.xml activity.xml (from layout directory) and the icons are copied to the resource directory in target, but I still get @string/back and so on as button text. I always got a crash when trying to access images as well, and the icon does not work. Is there anything I am doing wrong? Best, Alex -- Dr. Alexander K. Seewald Seewald Solutions www.seewald.at Tel. +43(664)1106886 Fax. +43(1)2533033/2764 |
From: Dr. A. K. S. <al...@se...> - 2009-12-16 19:41:33
|
Hi Arno, Thanks for implementing the missing opcodes. I've tracked down the two remaining pop2 opcodes and changed the source to remove them. BTW could you add a log statement in ObjectiveCOutputProcess.java? (e.g. at line #85: Log.debug("Processing class "+namespaceName+"."+className); ) It took me quite a while to find out at least the source code file where the pop2 opcodes comes from. Then it was quite easy to find. Sadly, although there are no missing opcodes now, the same code still crashes the machine. It _might_ be an AMD incompatibility, but setting up an Intel VMWare to test this is quite tricky... Best, Alex -- Dr. Alexander K. Seewald Seewald Solutions www.seewald.at Tel. +43(664)1106886 Fax. +43(1)2533033/2764 |
From: Dr. A. K. S. <al...@se...> - 2009-12-22 14:24:46
|
Hi all, I've taken a normal MacOS DVD and tried to install this on my webserver which has Intel Xeons, but found out that the BIOS disabled the VT capability... so currently I cannot install MacOS there - reboot is out of the question for at least another month. It turns out that I have no other non-AMD machine which is compatible at present. Would one of you be willing to test my code? Someone who either has - highest preference first - * an VMWare with MacOS and iPhone Dev Kit (preferably 3.1.4) on an _Intel_ processor (Note: the main processor is not emulated by VMWare, so yes - it makes a difference vs. AMD) * an Intel Mac with iPhone Dev Kit * a real Mac with iPhone Development Kit ... and can compile the app, run it on the iPhone simulator and tell whether or not it crashes the machine when clicking on "validate" button? (IMHO it should not even crash the emulator..) I just want to know whether my problems are due to my rather unique system configuration, or whether this is a bug in xmlvm after all. Please answer by eMail, I'll send the code via eMail as well (don't want it to be stored in public repositories... ;-). It's been converted with todays rev. 748 - still the same problem as described previously. If it's really an xmlvm problem, I'll cut it down to the shortest code which still has the problem and post it on the list. Best, Alex -- Dr. Alexander K. Seewald Seewald Solutions www.seewald.at Tel. +43(664)1106886 Fax. +43(1)2533033/2764 |
From: Arno P. <ar...@pu...> - 2009-12-15 13:09:08
|
Alex, I have these kind of problems all the time (although I never managed to crash my whole machine). The first step in finding the problem is to identify the precise location where the program crashes. The best way to do this is by setting breakpoints and to single step with Xcode. Tedious, but if you don't know where the program crashes it is virtually impossible to find out what is going on. Since your whole machine crashes, you might want to run and debug your program on the device. At least you don't have to reboot your Mac all the time. :) Arno On 12/15/09 2:03 PM, Dr. Alexander K. Seewald wrote: > There is something very strange going on. I get a major error when > initializing a FileInputStream with any resource path (i.e. path > obtained by ... > String fileName = getFileNamePath(findResourceNameById(resourceId)); > String filePath = NSBundle.mainBundle().pathForResource(fileName,"xml"); > - I've tested with activity.xml = my layout file and one raw > resource) > and then instantiating a new FileInputStream object. > > FileInputStream fis = new FileInputStream(filePath); > > If filePath does not exist, it gives a FileNotFound exception. If it > does exist (e.g. the activity.xml is obviously read during startup), > there is a major crash of the whole MacOS - not only the iPhone > emulator. > > I've noted that my icon is not shown as well, so perhaps there is a > problem with resources in general. However, my layout xml is pretty > basic: > > <?xml version="1.0" encoding="utf-8"?> > <LinearLayout > xmlns:android="http://schemas.android.com/apk/res/android" > android:layout_width="fill_parent" > android:layout_height="fill_parent" > android:orientation="vertical"> > > <TextView android:id="@+id/result" > android:layout_width="wrap_content" > android:layout_height="wrap_content"> > </TextView> > > <Button android:id="@+id/livetest" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:text="@string/livetest" > ></Button> > > <Button android:id="@+id/back" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:text="@string/back" > ></Button> > > <Button android:id="@+id/validate" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:text="@string/validate" > android:enabled="true" > ></Button> > </LinearLayout> > > ... as well as the AndroidManifest.xml: > > <?xml version="1.0" encoding="utf-8"?> > <manifest xmlns:android="http://schemas.android.com/apk/res/android" > package="com.SeewaldSolutions.DanceMusicRecognizer" > android:versionCode="1" > android:versionName="1.0"> > <uses-sdk android:minSdkVersion="3" /> > <uses-permission > android:name="android.permission.RECORD_AUDIO"></uses-permission> > <uses-permission > android:name="android.permission.INTERNET"></uses-permission> > <application android:label="@string/dancing_guide_app" > android:icon="@drawable/launcher"> > <activity android:name="DanceMusicRecognizerActivity" > android:icon="@drawable/launcher" > android:configChanges="orientation"> > <intent-filter> > <action android:name="android.intent.action.MAIN" /> > <category > android:name="android.intent.category.LAUNCHER" /> > </intent-filter> > </activity> > </application> > </manifest> > > > I compile using ... > javac > android_src/src/com/SeewaldSolutions/DanceMusicRecognizer/*.java > android_src/gen/com/SeewaldSolutions/DanceMusicRecognizer/R.java -d > android_src_build -cp > xmlvm/dist/lib/objc-compat.jar:xmlvm/dist/lib/android-compat.jar > > ... and use xmlvm like this ... > > java -jar xmlvm/dist/xmlvm.jar --in=android_src_build > --out=DanceMusicRecognizer --target=android-on-iphone > --iphone-app=DanceMusicRecognizer --resource=android_src/res/layout > --resource=android_src/res/raw --resource=android_src/res/drawable > --resource=android_src/AndroidManifest.xml > > activity.xml (from layout directory) and the icons are copied to the > resource directory in target, but I still get @string/back and so on > as button text. I always got a crash when trying to access images as > well, and the icon does not work. Is there anything I am doing > wrong? > > Best, > Alex |
From: Wolfgang K. <wol...@xm...> - 2009-12-15 16:12:09
|
Alex, One thing I noticed in your layout file: You make use of String resources. Unfortunately we currently do not support String resources. -- Wolfgang Sent from my iPhone On 15.12.2009, at 14:03, "Dr. Alexander K. Seewald" <al...@se...> wrote: > There is something very strange going on. I get a major error when > initializing a FileInputStream with any resource path (i.e. path > obtained by ... > String fileName = getFileNamePath(findResourceNameById(resourceId)); > String filePath = NSBundle.mainBundle().pathForResource > (fileName,"xml"); > - I've tested with activity.xml = my layout file and one raw > resource) > and then instantiating a new FileInputStream object. > > FileInputStream fis = new FileInputStream(filePath); > > If filePath does not exist, it gives a FileNotFound exception. If it > does exist (e.g. the activity.xml is obviously read during startup), > there is a major crash of the whole MacOS - not only the iPhone > emulator. > > I've noted that my icon is not shown as well, so perhaps there is a > problem with resources in general. However, my layout xml is pretty > basic: > > <?xml version="1.0" encoding="utf-8"?> > <LinearLayout > xmlns:android="http://schemas.android.com/apk/res/android" > android:layout_width="fill_parent" > android:layout_height="fill_parent" > android:orientation="vertical"> > > <TextView android:id="@+id/result" > android:layout_width="wrap_content" > android:layout_height="wrap_content"> > </TextView> > > <Button android:id="@+id/livetest" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:text="@string/livetest" >> </Button> > > <Button android:id="@+id/back" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:text="@string/back" >> </Button> > > <Button android:id="@+id/validate" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:text="@string/validate" > android:enabled="true" >> </Button> > </LinearLayout> > > ... as well as the AndroidManifest.xml: > > <?xml version="1.0" encoding="utf-8"?> > <manifest xmlns:android="http://schemas.android.com/apk/res/android" > package="com.SeewaldSolutions.DanceMusicRecognizer" > android:versionCode="1" > android:versionName="1.0"> > <uses-sdk android:minSdkVersion="3" /> > <uses-permission > android:name="android.permission.RECORD_AUDIO"></uses-permission> > <uses-permission > android:name="android.permission.INTERNET"></uses-permission> > <application android:label="@string/dancing_guide_app" > android:icon="@drawable/launcher"> > <activity android:name="DanceMusicRecognizerActivity" > android:icon="@drawable/launcher" > android:configChanges="orientation"> > <intent-filter> > <action android:name="android.intent.action.MAIN" /> > <category > android:name="android.intent.category.LAUNCHER" /> > </intent-filter> > </activity> > </application> > </manifest> > > > I compile using ... > javac > android_src/src/com/SeewaldSolutions/DanceMusicRecognizer/*.java > android_src/gen/com/SeewaldSolutions/DanceMusicRecognizer/R.java -d > android_src_build -cp > xmlvm/dist/lib/objc-compat.jar:xmlvm/dist/lib/android-compat.jar > > ... and use xmlvm like this ... > > java -jar xmlvm/dist/xmlvm.jar --in=android_src_build > --out=DanceMusicRecognizer --target=android-on-iphone > --iphone-app=DanceMusicRecognizer --resource=android_src/res/layout > --resource=android_src/res/raw --resource=android_src/res/drawable > --resource=android_src/AndroidManifest.xml > > activity.xml (from layout directory) and the icons are copied to the > resource directory in target, but I still get @string/back and so on > as button text. I always got a crash when trying to access images as > well, and the icon does not work. Is there anything I am doing > wrong? > > Best, > Alex > -- > Dr. Alexander K. Seewald > > Seewald Solutions > www.seewald.at > Tel. +43(664)1106886 > Fax. +43(1)2533033/2764 > > --- > --- > --- > --------------------------------------------------------------------- > Return on Information: > Google Enterprise Search pays you back > Get the facts. > http://p.sf.net/sfu/google-dev2dev > _______________________________________________ > xmlvm-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmlvm-users |
From: Dr. A. K. S. <al...@se...> - 2009-12-16 08:43:58
|
That was not it, although it explains why I got "@string/..." button labels. Still get the same problem with Rev. 710. I'll rebuild the whole setup for MacOS/VMware on an Intel machine - it could be that small parts of Xcode use Intel-specific (AMD-incompatible) opcodes. I find it suspicious that this relatively simple code actually crashes the whole machine... will keep you updated. I get the following notes during compilation (via javac): Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. ... and these when calling xmlvm: <jvm:land xmlns:vm="http://xmlvm.org" xmlns:jvm="http://xmlvm.org/jvm"/> <jvm:lushr xmlns:vm="http://xmlvm.org" xmlns:jvm="http://xmlvm.org/jvm"/> <jvm:lshl xmlns:vm="http://xmlvm.org" xmlns:jvm="http://xmlvm.org/jvm"/> <jvm:pop2 xmlns:vm="http://xmlvm.org" xmlns:jvm="http://xmlvm.org/jvm"/> <jvm:pop2 xmlns:vm="http://xmlvm.org" xmlns:jvm="http://xmlvm.org/jvm"/> <jvm:i2s xmlns:vm="http://xmlvm.org" xmlns:jvm="http://xmlvm.org/jvm"/> Also, the icon of my app is not shown although it is a PNG with exactly the same dimensions as the one from sayhello which is shown. Are there some specific requirements for PNGs? Is the icon defined in a way that xmlvm understands? Best, Alex On Tue, Dec 15, 2009 at 04:42:34PM +0100, Wolfgang Korn wrote: > Alex, > > One thing I noticed in your layout file: You make use of String > resources. Unfortunately we currently do not support String resources. > > -- Wolfgang > > Sent from my iPhone > > On 15.12.2009, at 14:03, "Dr. Alexander K. Seewald" <al...@se...> > wrote: > > >There is something very strange going on. I get a major error when > >initializing a FileInputStream with any resource path (i.e. path > >obtained by ... > > String fileName = getFileNamePath(findResourceNameById(resourceId)); > > String filePath = NSBundle.mainBundle().pathForResource > >(fileName,"xml"); > >- I've tested with activity.xml = my layout file and one raw > > resource) > >and then instantiating a new FileInputStream object. > > > >FileInputStream fis = new FileInputStream(filePath); > > > >If filePath does not exist, it gives a FileNotFound exception. If it > >does exist (e.g. the activity.xml is obviously read during startup), > >there is a major crash of the whole MacOS - not only the iPhone > >emulator. > > > >I've noted that my icon is not shown as well, so perhaps there is a > >problem with resources in general. However, my layout xml is pretty > >basic: > > > ><?xml version="1.0" encoding="utf-8"?> > ><LinearLayout > >xmlns:android="http://schemas.android.com/apk/res/android" > > android:layout_width="fill_parent" > >android:layout_height="fill_parent" > > android:orientation="vertical"> > > > > <TextView android:id="@+id/result" > > android:layout_width="wrap_content" > >android:layout_height="wrap_content"> > > </TextView> > > > > <Button android:id="@+id/livetest" > > android:layout_width="wrap_content" > >android:layout_height="wrap_content" > > android:text="@string/livetest" > >></Button> > > > > <Button android:id="@+id/back" > > android:layout_width="wrap_content" > >android:layout_height="wrap_content" > > android:text="@string/back" > >></Button> > > > > <Button android:id="@+id/validate" > > android:layout_width="wrap_content" > >android:layout_height="wrap_content" > > android:text="@string/validate" > > android:enabled="true" > >></Button> > ></LinearLayout> > > > >... as well as the AndroidManifest.xml: > > > ><?xml version="1.0" encoding="utf-8"?> > ><manifest xmlns:android="http://schemas.android.com/apk/res/android" > > package="com.SeewaldSolutions.DanceMusicRecognizer" > > android:versionCode="1" > > android:versionName="1.0"> > > <uses-sdk android:minSdkVersion="3" /> > > <uses-permission > >android:name="android.permission.RECORD_AUDIO"></uses-permission> > > <uses-permission > >android:name="android.permission.INTERNET"></uses-permission> > > <application android:label="@string/dancing_guide_app" > > android:icon="@drawable/launcher"> > > <activity android:name="DanceMusicRecognizerActivity" > > android:icon="@drawable/launcher" > > android:configChanges="orientation"> > > <intent-filter> > > <action android:name="android.intent.action.MAIN" /> > > <category > >android:name="android.intent.category.LAUNCHER" /> > > </intent-filter> > > </activity> > > </application> > ></manifest> > > > > > >I compile using ... > >javac > >android_src/src/com/SeewaldSolutions/DanceMusicRecognizer/*.java > >android_src/gen/com/SeewaldSolutions/DanceMusicRecognizer/R.java -d > >android_src_build -cp > >xmlvm/dist/lib/objc-compat.jar:xmlvm/dist/lib/android-compat.jar > > > >... and use xmlvm like this ... > > > >java -jar xmlvm/dist/xmlvm.jar --in=android_src_build > >--out=DanceMusicRecognizer --target=android-on-iphone > >--iphone-app=DanceMusicRecognizer --resource=android_src/res/layout > >--resource=android_src/res/raw --resource=android_src/res/drawable > >--resource=android_src/AndroidManifest.xml > > > >activity.xml (from layout directory) and the icons are copied to the > >resource directory in target, but I still get @string/back and so on > >as button text. I always got a crash when trying to access images as > >well, and the icon does not work. Is there anything I am doing > >wrong? > > > >Best, > > Alex > >-- > >Dr. Alexander K. Seewald > > > >Seewald Solutions > >www.seewald.at > >Tel. +43(664)1106886 > >Fax. +43(1)2533033/2764 > > > >--- > >--- > >--- > >--------------------------------------------------------------------- > >Return on Information: > >Google Enterprise Search pays you back > >Get the facts. > >http://p.sf.net/sfu/google-dev2dev > >_______________________________________________ > >xmlvm-users mailing list > >xml...@li... > >https://lists.sourceforge.net/lists/listinfo/xmlvm-users |
From: Arno P. <ar...@pu...> - 2009-12-16 10:46:30
|
I just added support for the byte code instructions you are missing. The icon needs to be set in the Info.plist. Arno On 12/16/09 9:42 AM, Dr. Alexander K. Seewald wrote: > That was not it, although it explains why I got "@string/..." button > labels. Still get the same problem with Rev. 710. > > I'll rebuild the whole setup for MacOS/VMware on an Intel machine - > it could be that small parts of Xcode use Intel-specific > (AMD-incompatible) opcodes. I find it suspicious that this > relatively simple code actually crashes the whole machine... will > keep you updated. > > I get the following notes during compilation (via javac): > Note: Some input files use unchecked or unsafe operations. > Note: Recompile with -Xlint:unchecked for details. > ... and these when calling xmlvm: > > <jvm:land xmlns:vm="http://xmlvm.org" xmlns:jvm="http://xmlvm.org/jvm"/> > <jvm:lushr xmlns:vm="http://xmlvm.org" xmlns:jvm="http://xmlvm.org/jvm"/> > <jvm:lshl xmlns:vm="http://xmlvm.org" xmlns:jvm="http://xmlvm.org/jvm"/> > <jvm:pop2 xmlns:vm="http://xmlvm.org" xmlns:jvm="http://xmlvm.org/jvm"/> > <jvm:pop2 xmlns:vm="http://xmlvm.org" xmlns:jvm="http://xmlvm.org/jvm"/> > <jvm:i2s xmlns:vm="http://xmlvm.org" xmlns:jvm="http://xmlvm.org/jvm"/> > > Also, the icon of my app is not shown although it is a PNG with > exactly the same dimensions as the one from sayhello which is > shown. Are there some specific requirements for PNGs? Is the icon > defined in a way that xmlvm understands? > > Best, > Alex > > > On Tue, Dec 15, 2009 at 04:42:34PM +0100, Wolfgang Korn wrote: >> Alex, >> >> One thing I noticed in your layout file: You make use of String >> resources. Unfortunately we currently do not support String resources. >> >> -- Wolfgang >> >> Sent from my iPhone >> >> On 15.12.2009, at 14:03, "Dr. Alexander K. Seewald"<al...@se...> >> wrote: >> >>> There is something very strange going on. I get a major error when >>> initializing a FileInputStream with any resource path (i.e. path >>> obtained by ... >>> String fileName = getFileNamePath(findResourceNameById(resourceId)); >>> String filePath = NSBundle.mainBundle().pathForResource >>> (fileName,"xml"); >>> - I've tested with activity.xml = my layout file and one raw >>> resource) >>> and then instantiating a new FileInputStream object. >>> >>> FileInputStream fis = new FileInputStream(filePath); >>> >>> If filePath does not exist, it gives a FileNotFound exception. If it >>> does exist (e.g. the activity.xml is obviously read during startup), >>> there is a major crash of the whole MacOS - not only the iPhone >>> emulator. >>> >>> I've noted that my icon is not shown as well, so perhaps there is a >>> problem with resources in general. However, my layout xml is pretty >>> basic: >>> >>> <?xml version="1.0" encoding="utf-8"?> >>> <LinearLayout >>> xmlns:android="http://schemas.android.com/apk/res/android" >>> android:layout_width="fill_parent" >>> android:layout_height="fill_parent" >>> android:orientation="vertical"> >>> >>> <TextView android:id="@+id/result" >>> android:layout_width="wrap_content" >>> android:layout_height="wrap_content"> >>> </TextView> >>> >>> <Button android:id="@+id/livetest" >>> android:layout_width="wrap_content" >>> android:layout_height="wrap_content" >>> android:text="@string/livetest" >>>> </Button> >>> >>> <Button android:id="@+id/back" >>> android:layout_width="wrap_content" >>> android:layout_height="wrap_content" >>> android:text="@string/back" >>>> </Button> >>> >>> <Button android:id="@+id/validate" >>> android:layout_width="wrap_content" >>> android:layout_height="wrap_content" >>> android:text="@string/validate" >>> android:enabled="true" >>>> </Button> >>> </LinearLayout> >>> >>> ... as well as the AndroidManifest.xml: >>> >>> <?xml version="1.0" encoding="utf-8"?> >>> <manifest xmlns:android="http://schemas.android.com/apk/res/android" >>> package="com.SeewaldSolutions.DanceMusicRecognizer" >>> android:versionCode="1" >>> android:versionName="1.0"> >>> <uses-sdk android:minSdkVersion="3" /> >>> <uses-permission >>> android:name="android.permission.RECORD_AUDIO"></uses-permission> >>> <uses-permission >>> android:name="android.permission.INTERNET"></uses-permission> >>> <application android:label="@string/dancing_guide_app" >>> android:icon="@drawable/launcher"> >>> <activity android:name="DanceMusicRecognizerActivity" >>> android:icon="@drawable/launcher" >>> android:configChanges="orientation"> >>> <intent-filter> >>> <action android:name="android.intent.action.MAIN" /> >>> <category >>> android:name="android.intent.category.LAUNCHER" /> >>> </intent-filter> >>> </activity> >>> </application> >>> </manifest> >>> >>> >>> I compile using ... >>> javac >>> android_src/src/com/SeewaldSolutions/DanceMusicRecognizer/*.java >>> android_src/gen/com/SeewaldSolutions/DanceMusicRecognizer/R.java -d >>> android_src_build -cp >>> xmlvm/dist/lib/objc-compat.jar:xmlvm/dist/lib/android-compat.jar >>> >>> ... and use xmlvm like this ... >>> >>> java -jar xmlvm/dist/xmlvm.jar --in=android_src_build >>> --out=DanceMusicRecognizer --target=android-on-iphone >>> --iphone-app=DanceMusicRecognizer --resource=android_src/res/layout >>> --resource=android_src/res/raw --resource=android_src/res/drawable >>> --resource=android_src/AndroidManifest.xml >>> >>> activity.xml (from layout directory) and the icons are copied to the >>> resource directory in target, but I still get @string/back and so on >>> as button text. I always got a crash when trying to access images as >>> well, and the icon does not work. Is there anything I am doing >>> wrong? >>> >>> Best, >>> Alex >>> -- >>> Dr. Alexander K. Seewald >>> >>> Seewald Solutions >>> www.seewald.at >>> Tel. +43(664)1106886 >>> Fax. +43(1)2533033/2764 >>> >>> --- >>> --- >>> --- >>> --------------------------------------------------------------------- >>> Return on Information: >>> Google Enterprise Search pays you back >>> Get the facts. >>> http://p.sf.net/sfu/google-dev2dev >>> _______________________________________________ >>> xmlvm-users mailing list >>> xml...@li... >>> https://lists.sourceforge.net/lists/listinfo/xmlvm-users > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > xmlvm-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmlvm-users |
From: Arno P. <ar...@pu...> - 2009-12-16 13:02:17
|
I had to remove the pop2 instruction again. Please read my post with the subject line 'pop2' for details. Arno On 12/16/09 9:42 AM, Dr. Alexander K. Seewald wrote: > That was not it, although it explains why I got "@string/..." button > labels. Still get the same problem with Rev. 710. > > I'll rebuild the whole setup for MacOS/VMware on an Intel machine - > it could be that small parts of Xcode use Intel-specific > (AMD-incompatible) opcodes. I find it suspicious that this > relatively simple code actually crashes the whole machine... will > keep you updated. > > I get the following notes during compilation (via javac): > Note: Some input files use unchecked or unsafe operations. > Note: Recompile with -Xlint:unchecked for details. > ... and these when calling xmlvm: > > <jvm:land xmlns:vm="http://xmlvm.org" xmlns:jvm="http://xmlvm.org/jvm"/> > <jvm:lushr xmlns:vm="http://xmlvm.org" xmlns:jvm="http://xmlvm.org/jvm"/> > <jvm:lshl xmlns:vm="http://xmlvm.org" xmlns:jvm="http://xmlvm.org/jvm"/> > <jvm:pop2 xmlns:vm="http://xmlvm.org" xmlns:jvm="http://xmlvm.org/jvm"/> > <jvm:pop2 xmlns:vm="http://xmlvm.org" xmlns:jvm="http://xmlvm.org/jvm"/> > <jvm:i2s xmlns:vm="http://xmlvm.org" xmlns:jvm="http://xmlvm.org/jvm"/> > > Also, the icon of my app is not shown although it is a PNG with > exactly the same dimensions as the one from sayhello which is > shown. Are there some specific requirements for PNGs? Is the icon > defined in a way that xmlvm understands? > > Best, > Alex > > > On Tue, Dec 15, 2009 at 04:42:34PM +0100, Wolfgang Korn wrote: >> Alex, >> >> One thing I noticed in your layout file: You make use of String >> resources. Unfortunately we currently do not support String resources. >> >> -- Wolfgang >> >> Sent from my iPhone >> >> On 15.12.2009, at 14:03, "Dr. Alexander K. Seewald"<al...@se...> >> wrote: >> >>> There is something very strange going on. I get a major error when >>> initializing a FileInputStream with any resource path (i.e. path >>> obtained by ... >>> String fileName = getFileNamePath(findResourceNameById(resourceId)); >>> String filePath = NSBundle.mainBundle().pathForResource >>> (fileName,"xml"); >>> - I've tested with activity.xml = my layout file and one raw >>> resource) >>> and then instantiating a new FileInputStream object. >>> >>> FileInputStream fis = new FileInputStream(filePath); >>> >>> If filePath does not exist, it gives a FileNotFound exception. If it >>> does exist (e.g. the activity.xml is obviously read during startup), >>> there is a major crash of the whole MacOS - not only the iPhone >>> emulator. >>> >>> I've noted that my icon is not shown as well, so perhaps there is a >>> problem with resources in general. However, my layout xml is pretty >>> basic: >>> >>> <?xml version="1.0" encoding="utf-8"?> >>> <LinearLayout >>> xmlns:android="http://schemas.android.com/apk/res/android" >>> android:layout_width="fill_parent" >>> android:layout_height="fill_parent" >>> android:orientation="vertical"> >>> >>> <TextView android:id="@+id/result" >>> android:layout_width="wrap_content" >>> android:layout_height="wrap_content"> >>> </TextView> >>> >>> <Button android:id="@+id/livetest" >>> android:layout_width="wrap_content" >>> android:layout_height="wrap_content" >>> android:text="@string/livetest" >>>> </Button> >>> >>> <Button android:id="@+id/back" >>> android:layout_width="wrap_content" >>> android:layout_height="wrap_content" >>> android:text="@string/back" >>>> </Button> >>> >>> <Button android:id="@+id/validate" >>> android:layout_width="wrap_content" >>> android:layout_height="wrap_content" >>> android:text="@string/validate" >>> android:enabled="true" >>>> </Button> >>> </LinearLayout> >>> >>> ... as well as the AndroidManifest.xml: >>> >>> <?xml version="1.0" encoding="utf-8"?> >>> <manifest xmlns:android="http://schemas.android.com/apk/res/android" >>> package="com.SeewaldSolutions.DanceMusicRecognizer" >>> android:versionCode="1" >>> android:versionName="1.0"> >>> <uses-sdk android:minSdkVersion="3" /> >>> <uses-permission >>> android:name="android.permission.RECORD_AUDIO"></uses-permission> >>> <uses-permission >>> android:name="android.permission.INTERNET"></uses-permission> >>> <application android:label="@string/dancing_guide_app" >>> android:icon="@drawable/launcher"> >>> <activity android:name="DanceMusicRecognizerActivity" >>> android:icon="@drawable/launcher" >>> android:configChanges="orientation"> >>> <intent-filter> >>> <action android:name="android.intent.action.MAIN" /> >>> <category >>> android:name="android.intent.category.LAUNCHER" /> >>> </intent-filter> >>> </activity> >>> </application> >>> </manifest> >>> >>> >>> I compile using ... >>> javac >>> android_src/src/com/SeewaldSolutions/DanceMusicRecognizer/*.java >>> android_src/gen/com/SeewaldSolutions/DanceMusicRecognizer/R.java -d >>> android_src_build -cp >>> xmlvm/dist/lib/objc-compat.jar:xmlvm/dist/lib/android-compat.jar >>> >>> ... and use xmlvm like this ... >>> >>> java -jar xmlvm/dist/xmlvm.jar --in=android_src_build >>> --out=DanceMusicRecognizer --target=android-on-iphone >>> --iphone-app=DanceMusicRecognizer --resource=android_src/res/layout >>> --resource=android_src/res/raw --resource=android_src/res/drawable >>> --resource=android_src/AndroidManifest.xml >>> >>> activity.xml (from layout directory) and the icons are copied to the >>> resource directory in target, but I still get @string/back and so on >>> as button text. I always got a crash when trying to access images as >>> well, and the icon does not work. Is there anything I am doing >>> wrong? >>> >>> Best, >>> Alex >>> -- >>> Dr. Alexander K. Seewald >>> >>> Seewald Solutions >>> www.seewald.at >>> Tel. +43(664)1106886 >>> Fax. +43(1)2533033/2764 >>> >>> --- >>> --- >>> --- >>> --------------------------------------------------------------------- >>> Return on Information: >>> Google Enterprise Search pays you back >>> Get the facts. >>> http://p.sf.net/sfu/google-dev2dev >>> _______________________________________________ >>> xmlvm-users mailing list >>> xml...@li... >>> https://lists.sourceforge.net/lists/listinfo/xmlvm-users > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > xmlvm-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmlvm-users |