hi too all ,i post this question before but still have no solution...im developing for both android and iphone...my issue is that my image in the main window is not seen in ANDROID but is seen in IOS im using titanium 2.0.2GA and im using google API andorid 2.2. and im testing the app on my device which is a samsung skyrocket...if anything i would like to send my app project so someone can look it over and help me out please i also tried this method
//i placed my image in android/images/res-long-land-hdpiand at window1.js i use
var logo = Titanium.UI.createImageView ({ image:'images/69.jpg', width:253, height:96, left:0, top:0, });but when i deploy the app in a my samsung skyrocket...i also get a error.....i was told to create a folder high,medium,low...but when i create a folder and try to launch it in the app i get a error.. which are the following
//I get this error when i add a image or a folder in images [ERROR] Error(s) compiling generated Java code [ERROR] /Users/kingproduction/Documents/Titanium Studio Workspace/barbershop/build/android/gen/com/mambo/R.java:14: <identifier> expected public static final int 69_5f35e41f22=0x7f020000; ^ /Users/kingproduction/Documents/Titanium Studio Workspace/barbershop/build/android/gen/com/mambo/R.java:14: <identifier> expected public static final int 69_5f35e41f22=0x7f020000; ^ 2 errors
2 Answers
Accepted Answer
Use a leading "/" in your image paths. In fact, use a leading "/" for all paths in Ti Mobile. You don't have to, but not everyone knows when you need them and when you can get away with them. If you always use them, you'll save yourself a lot of pain.
Are you naming one of your image files with a number? That may cause your R.java compile problems.
The samsung skyrocket has a screen resolution of 800x480 which is considered WVGA resolution.
Your problem may be that you are declaring the device as having the "long" aspect ratio (res-long-land-hdpi) when it may not be.
Try putting your image within the "notlong" folder: android/images/res-notlong-land-hdpi
Or you can remove the long/notlong property from the folder name: android/images/res-land-hdpi
Your Answer
Think you can help? Login to answer this question!