网格,在android 2.3 Appcelerator中清空Mapview

时间:2014-08-16 17:11:59

标签: android titanium android-mapview appcelerator titanium-alloy

我使用钛金属加速器编程了一个应用程序。 我一直在努力工作,但没有办法。我已经尝试了在互联网上找到的所有内容而没有解决方案。

事实是,没有办法在Android 2.3的智能手机上显示mapview,但如果它在Android 4及更高版本上运行良好。

我只在adroid 2.3上看到网格和缩放控件。

我已经在最新版本中成功安装了Google Play服务,我已经将mapview直接添加到窗口而没有成功,我也尝试将模态窗口设置为false而没有。

Api Key我已正确配置它,因为我将应用程序上传到Google Play并正常工作,正如我在android 4及更高版本中所述。

SDK 3.2.3 / 3.3.0

tiapp.xml

<android xmlns:android="http://schemas.android.com/apk/res/android">
    <manifest android:installLocation="preferExternal"
        android:versionCode="10" android:versionName="1.2.0">
        <application android:hardwareAccelerated="true" android:largeHeap="true"/>
        <uses-sdk android:maxSdkVersion="19"
            android:minSdkVersion="10" android:targetSdkVersion="19"/>
        <uses-permission android:name="android.permission.INTERNET"/>
        <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
        <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
        <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
        <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
        <uses-feature android:glEsVersion="0x00020000" android:required="true"/>
        <uses-permission android:name="com.example.app.permission.MAPS_RECEIVE"/>
        <permission android:name="com.example.app.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
        <application>
            <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="XXX"/>
        </application>
    </manifest>
</android>

的.js

var Map = require('ti.map');
                var mapview = Map.createView({
                    mapType: Map.NORMAL_TYPE,
                    region: {latitude: 40.6854154,
                        longitude: -17.88848876953125,
                            latitudeDelta:0.1, longitudeDelta:0.1},
                    animate:true,               
                    regionFit:true,
                    userLocation:true,
                    annotations:[pointIni,pointFin] 
                });

我需要帮助,谢谢。

1 个答案:

答案 0 :(得分:0)

嗨,这是android 2.3设备中的调试日志模式。

其中一条日志消息未安装Google Play服务,但我向您保证。

[WARN] :   dalvikvm: VFY: unable to resolve static field 1623 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] :   dalvikvm: VFY: unable to resolve static field 1623 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] :   dalvikvm: VFY: unable to resolve static field 1618 (common_google_play_services_install_title) in Lcom/google/android/gms/R$string;
[WARN] :   dalvikvm: VFY: unable to resolve static field 1614 (common_google_play_services_enable_title) in Lcom/google/android/gms/R$string;
[WARN] :   dalvikvm: VFY: unable to resolve static field 1629 (common_google_play_services_update_title) in Lcom/google/android/gms/R$string;
[WARN] :   dalvikvm: VFY: unable to resolve static field 1626 (common_google_play_services_unsupported_title) in Lcom/google/android/gms/R$string;
[WARN] :   dalvikvm: VFY: unable to resolve static field 1622 (common_google_play_services_network_error_title) in Lcom/google/android/gms/R$string;
[WARN] :   dalvikvm: VFY: unable to resolve static field 1623 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] :   dalvikvm: VFY: unable to resolve static field 1623 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] :   dalvikvm: VFY: unable to resolve static field 1620 (common_google_play_services_invalid_account_title) in Lcom/google/android/gms/R$string;
[WARN] :   dalvikvm: VFY: unable to resolve static field 1623 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] :   dalvikvm: VFY: unable to resolve static field 1626 (common_google_play_services_unsupported_title) in Lcom/google/android/gms/R$string;
[WARN] :   dalvikvm: VFY: unable to resolve static field 1615 (common_google_play_services_install_button) in Lcom/google/android/gms/R$string;
[WARN] :   dalvikvm: VFY: unable to resolve static field 1612 (common_google_play_services_enable_button) in Lcom/google/android/gms/R$string;
[WARN] :   dalvikvm: VFY: unable to resolve static field 1627 (common_google_play_services_update_button) in Lcom/google/android/gms/R$string;
[WARN] :   dalvikvm: VFY: unable to resolve static field 1623 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] :   dalvikvm: VFY: unable to resolve static field 1617 (common_google_play_services_install_text_tablet) in Lcom/google/android/gms/R$string;
[WARN] :   dalvikvm: VFY: unable to resolve static field 1616 (common_google_play_services_install_text_phone) in Lcom/google/android/gms/R$string;
[WARN] :   dalvikvm: VFY: unable to resolve static field 1613 (common_google_play_services_enable_text) in Lcom/google/android/gms/R$string;
[WARN] :   dalvikvm: VFY: unable to resolve static field 1628 (common_google_play_services_update_text) in Lcom/google/android/gms/R$string;
[WARN] :   dalvikvm: VFY: unable to resolve static field 1625 (common_google_play_services_unsupported_text) in Lcom/google/android/gms/R$string;
[WARN] :   dalvikvm: VFY: unable to resolve static field 1621 (common_google_play_services_network_error_text) in Lcom/google/android/gms/R$string;
[WARN] :   dalvikvm: VFY: unable to resolve static field 1619 (common_google_play_services_invalid_account_text) in Lcom/google/android/gms/R$string;
[WARN] :   dalvikvm: VFY: unable to resolve static field 1624 (common_google_play_services_unsupported_date_text) in Lcom/google/android/gms/R$string;
[WARN] :   dalvikvm: VFY: unable to resolve instance field 42
[WARN] :   dalvikvm: VFY: unable to resolve static field 1623 (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] :   Google Play services is installed.
[INFO] :   TiVerify: (Timer-0) [980,4266] Succesfully verified module licenses
[INFO] :   dalvikvm: Jit: resizing JitTable from 1024 to 2048
[WARN] :   dalvikvm: VFY: unable to resolve static field 1633 (MapAttrs) in Lcom/google/android/gms/R$styleable;
[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] :   dalvikvm: Could not find method gui.a, referenced from method gqh.a
[WARN] :   dalvikvm: VFY: unable to resolve static method 24934: Lgui;.a (Landroid/content/Context;)Lgrh;
[ERROR] :  dalvikvm: Could not find class 'gpq', referenced from method gpr.a
[WARN] :   dalvikvm: VFY: unable to resolve new-instance 4090 (Lgpq;) in Lgpr;
[ERROR] :  dalvikvm: Could not find class 'gpq', referenced from method gpr.a
[WARN] :   dalvikvm: VFY: unable to resolve new-instance 4090 (Lgpq;) in Lgpr;
[WARN] :   dalvikvm: VFY: unable to resolve new-instance 4090 (Lgpq;) in Lgpr;
[ERROR] :  dalvikvm: Could not find class 'gpq', referenced from method gpr.a
[INFO] :   I/Google Maps Android API: Google Play services package version: 5089012
[WARN] :   dalvikvm: VFY: unable to resolve static field 20875 (t) in Lyo;
[WARN] :   dalvikvm: Unable to resolve superclass of Lotj; (653)
[WARN] :   dalvikvm: Link of class 'Lotj;' failed
[WARN] :   dalvikvm: Unable to resolve superclass of Lokj; (8003)
[WARN] :   dalvikvm: Link of class 'Lokj;' failed
[WARN] :   dalvikvm: Unable to resolve superclass of Lovw; (7709)
[WARN] :   dalvikvm: Link of class 'Lovw;' failed
[ERROR] :  dalvikvm: Could not find class 'ovw', referenced from method oyf.a
[WARN] :   dalvikvm: VFY: unable to resolve new-instance 8070 (Lovw;) in Loyf;
[WARN] :   dalvikvm: VFY: unable to resolve static field 20875 (t) in Lyo;
[INFO] :   dalvikvm: Could not find method android.content.Context.registerComponentCallbacks, referenced from method oze.registerComponentCallbacks
[WARN] :   dalvikvm: VFY: unable to resolve virtual method 1553: Landroid/content/Context;.registerComponentCallbacks (Landroid/content/ComponentCallbacks;)V
[INFO] :   dalvikvm: Could not find method android.content.Context.unregisterComponentCallbacks, referenced from method oze.unregisterComponentCallbacks
[WARN] :   dalvikvm: VFY: unable to resolve virtual method 1566: Landroid/content/Context;.unregisterComponentCallbacks (Landroid/content/ComponentCallbacks;)V
[INFO] :   dalvikvm: Could not find method osw.dispatchHoverEvent, referenced from method oli.dispatchHoverEvent
[WARN] :   dalvikvm: VFY: unable to resolve virtual method 44561: Losw;.dispatchHoverEvent (Landroid/view/MotionEvent;)Z
[INFO] :   dalvikvm: Failed resolving Lcom/google/android/gms/location/internal/ParcelableGeofence; interface 4023 'Lglm;'
[ERROR] :  dalvikvm: Could not find class 'com.google.android.gms.location.internal.ParcelableGeofence', referenced from method gls.a
[WARN] :   dalvikvm: Link of class 'Lcom/google/android/gms/location/internal/ParcelableGeofence;' failed
[WARN] :   dalvikvm: VFY: unable to resolve check-cast 2086 (Lcom/google/android/gms/location/internal/ParcelableGeofence;) in Lgls;
[INFO] :   dalvikvm: Could not find method android.app.Activity.getFragmentManager, referenced from method bmo.a
[WARN] :   dalvikvm: VFY: unable to resolve virtual method 1187: Landroid/app/Activity;.getFragmentManager ()Landroid/app/FragmentManager;
[WARN] :   dalvikvm: VFY: unable to resolve instance field 675
[INFO] :   dalvikvm: Could not find method android.app.AlertDialog$Builder.<init>, referenced from method bmo.b
[WARN] :   dalvikvm: VFY: unable to resolve direct method 1245: Landroid/app/AlertDialog$Builder;.<init> (Landroid/content/Context;I)V
[WARN] :   TiDrawableReference: (main) [5540,9806] Could not open stream to get bitmap
[WARN] :   TiDrawableReference: (main) [1,9807] Could not open stream to get bitmap
[WARN] :   AnnotationProxy: (main) [1,9808] Unable to get the image from the path:
[ERROR] :  E/        : Creating OpenGL 1.1 Session
[INFO] :   dalvikvm: Failed resolving Lcom/google/android/gms/location/internal/ParcelableGeofence; interface 4023 'Lglm;'
[WARN] :   dalvikvm: Link of class 'Lcom/google/android/gms/location/internal/ParcelableGeofence;' failed
[WARN] :   dalvikvm: VFY: unable to resolve static field 4203 (CREATOR) in Lcom/google/android/gms/location/internal/ParcelableGeofence;
[WARN] :   dalvikvm: VFY: unable to resolve static field 1633 (MapAttrs) in Lcom/google/android/gms/R$styleable;
[WARN] :   KeyCharacterMap: No keyboard for id 65538
[WARN] :   KeyCharacterMap: Using default keymap: /system/usr/keychars/qwerty.kcm.bin