Project: titanium
Issue TIMOB-17462: Can't use density-independent image as map annotation rightButton
h4. Problem Description Everytime I try to use a density independent image as map annotation rightButton property, I get the following error (like the image was not there): {code} [WARN] dalvikvm: VFY: unable to resolve static field 1611 (common_google_play_services_install_button) in Lcom/google/android/gms/R$string; [WARN] dalvikvm: VFY: unable to resolve static field 1608 (common_google_play_services_enable_button) in Lcom/google/android/gms/R$string; [WARN] dalvikvm: VFY: unable to resolve static field 1623 (common_google_play_services_update_button) in Lcom/google/android/gms/R$string; [WARN] dalvikvm: VFY: unable to resolve static field 1619 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string; [WARN] dalvikvm: VFY: unable to resolve static field 1613 (common_google_play_services_install_text_tablet) in Lcom/google/android/gms/R$string; [WARN] dalvikvm: VFY: unable to resolve static field 1612 (common_google_play_services_install_text_phone) in Lcom/google/android/gms/R$string; [WARN] dalvikvm: VFY: unable to resolve static field 1609 (common_google_play_services_enable_text) in Lcom/google/android/gms/R$string; [WARN] dalvikvm: VFY: unable to resolve static field 1624 (common_google_play_services_update_text) in Lcom/google/android/gms/R$string; [WARN] dalvikvm: VFY: unable to resolve static field 1621 (common_google_play_services_unsupported_text) in Lcom/google/android/gms/R$string; [WARN] dalvikvm: VFY: unable to resolve static field 1617 (common_google_play_services_network_error_text) in Lcom/google/android/gms/R$string; [WARN] dalvikvm: VFY: unable to resolve static field 1615 (common_google_play_services_invalid_account_text) in Lcom/google/android/gms/R$string; [WARN] dalvikvm: VFY: unable to resolve static field 1620 (common_google_play_services_unsupported_date_text) in Lcom/google/android/gms/R$string; [WARN] dalvikvm: VFY: unable to resolve static field 1619 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string; [ERROR] GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included. [INFO] I/Google Maps Android API: Google Play services client version: 4132500 [INFO] I/Google Maps Android API: Google Play services package version: 4452032 [INFO] fpp: Making Creator dynamically [INFO] I/Google Maps Android API: Google Play services client version: 4452000 [DEBUG] dalvikvm: GC_CONCURRENT freed 1928K, 25% free 8152K/10755K, paused 29ms+18ms, total 129ms [INFO] Choreographer: Skipped 79 frames! The application may be doing too much work on its main thread. [INFO] I/Adreno200-EGL: : EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_JB_REL_RB1.04.01.01.06.042_msm7627a_JB_REL_RB1.2_Merge_release_AU (Merge) [INFO] I/Adreno200-EGL: Build Date: 11/06/12 Tue [INFO] I/Adreno200-EGL: Local Branch: [INFO] I/Adreno200-EGL: Remote Branch: m/jb_rel_rb1.2 [INFO] I/Adreno200-EGL: Local Patches: NONE [INFO] I/Adreno200-EGL: Reconstruct Branch: AU_LINUX_ANDROID_JB_REL_RB1.04.01.01.06.042 + NOTHING [ERROR] TiDrawableReference: (main) [2960,2960] Problem opening stream with url /images/infoicon.png: Resources/images/infoicon.png [ERROR] TiDrawableReference: java.io.FileNotFoundException: Resources/images/infoicon.png [ERROR] TiDrawableReference: at android.content.res.AssetManager.openAsset(Native Method) [ERROR] TiDrawableReference: at android.content.res.AssetManager.open(AssetManager.java:315) [ERROR] TiDrawableReference: at android.content.res.AssetManager.open(AssetManager.java:289) [ERROR] TiDrawableReference: at org.appcelerator.titanium.util.TiFileHelper.openInputStream(TiFileHelper.java:220) [ERROR] TiDrawableReference: at org.appcelerator.titanium.view.TiDrawableReference.getInputStream(TiDrawableReference.java:791) [ERROR] TiDrawableReference: at org.appcelerator.titanium.view.TiDrawableReference.getBitmap(TiDrawableReference.java:300) [ERROR] TiDrawableReference: at org.appcelerator.titanium.view.TiDrawableReference.getBitmap(TiDrawableReference.java:284) [ERROR] TiDrawableReference: at ti.map.TiMapInfoWindow.setLeftOrRightPane(TiMapInfoWindow.java:171) [ERROR] TiDrawableReference: at ti.map.AnnotationProxy.processOptions(AnnotationProxy.java:168) [ERROR] TiDrawableReference: at ti.map.TiUIMapView.addAnnotation(TiUIMapView.java:327) [ERROR] TiDrawableReference: at ti.map.TiUIMapView.addAnnotations(TiUIMapView.java:341) [ERROR] TiDrawableReference: at ti.map.TiUIMapView.processMapProperties(TiUIMapView.java:157) [ERROR] TiDrawableReference: at ti.map.TiUIMapView.onViewCreated(TiUIMapView.java:111) [ERROR] TiDrawableReference: at org.appcelerator.titanium.view.TiUIFragment.handleMessage(TiUIFragment.java:65) [ERROR] TiDrawableReference: at android.os.Handler.dispatchMessage(Handler.java:95) [ERROR] TiDrawableReference: at android.os.Looper.loop(Looper.java:137) [ERROR] TiDrawableReference: at android.app.ActivityThread.main(ActivityThread.java:4795) [ERROR] TiDrawableReference: at java.lang.reflect.Method.invokeNative(Native Method) [ERROR] TiDrawableReference: at java.lang.reflect.Method.invoke(Method.java:511) [ERROR] TiDrawableReference: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789) [ERROR] TiDrawableReference: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556) [ERROR] TiDrawableReference: at dalvik.system.NativeStart.main(Native Method) {code} h3.Testing Environment: Titanium SDK: 3.2.3.GA 3.3.0.RC, Titanium CLI: 3.3.0 –rc, Android SDK: 4.2.2,4.4.2, OS X Version: 10.9.3, Appcelerator Studio: 3.2.3 h3.Steps to reproduce the issue: 1.Create a Alloy project. 2.Paste this code in index.xml,index.js file and Alloy.js file. 3.configure your tiapp.xml file with Google API key. 4. Paste some density-independent image in Android>images>> folders 5.Run this code with testing environment. {code: title=index.xml}	{code} {code: title=index.js} $.map.setAnnotations([Alloy.Globals.Map.createAnnotation({	latitude : 35.8667,	longitude : 6.2333,	title : 'A title',	subtitle:'test',	rightButton : "/images/infoicon.png" }), Alloy.Globals.Map.createAnnotation({	latitude : 44.8667,	longitude : 10.2333,	title : 'Another title',	subtitle:'test',	leftButton : "/images/infoicon.png" })]); $.index.open(); {code} {code: title=alloy.js} Alloy.Globals.Map = require('ti.map'); {code}
Story points: 3