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 |