appceleratorでアプリにgmapsを挿入する必要があります。Appcelerator TitaniumでGoogleマップを表示または表示する方法 - Androidアプリ(エラー:Google Playサービスのリソースが見つかりませんでした)
var Map = require('ti.map');
var mountainView = Map.createAnnotation({
latitude:37.390749,
longitude:-122.081651,
title:"Appcelerator Headquarters",
subtitle:'Mountain View, CA',
pincolor:Map.ANNOTATION_RED,
myid:1 // Custom property to uniquely identify this annotation.
});
var mapview = Map.createView({
mapType: Map.NORMAL_TYPE,
region: {latitude:33.74511, longitude:-84.38993,
latitudeDelta:0.01, longitudeDelta:0.01},
animate:true,
regionFit:true,
userLocation:true,
annotations:[mountainView]
});
var circle = Map.createCircle({
center: { latitude: 33.74511, longitude: -84.38993 },
radius: 1000, //1km
fillColor: "#20FF0000"
});
mapview.addCircle(circle);
// Handle click events on any annotations on this map.
mapview.addEventListener('click', function(evt) {
Ti.API.info("Clicked " + evt.clicksource + " on " + evt.latitude + "," + evt.longitude);
});
$.item.add(mapview);
しかし、私はこのエラーを取得:
controlllerで<android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest>
<application android:theme="@style/Theme.MyTheme">
<activity android:label="@string/app_name"
android:name=".Activity" android:theme="@style/Theme.Titanium" >
<uses-permission android:name="android.permission.INTERNET" />
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="!MY_API_KEY!"/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
</intent-filter>
</activity>
</application>
</manifest>
<services>
<service type="interval" url="service.js"/>
</services>
</android>
:私はtiapp.xmlでは、すべてこのガイドでhttp://docs.appcelerator.com/platform/latest/#!/guide/Google_Maps_v2_for_Android
を行う
[WARN] : art: Attempt to remove non-JNI local reference, dumping hread
[ERROR] : SysUtils: ApplicationContext is null in ApplicationStatus
[WARN] : chromium: [WARNING:resource_bundle.cc(285)] locale_file_path.empty()
[ERROR] : libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY)
[ERROR] : libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY)
[WARN] : AudioManagerAndroid: Requires BLUETOOTH permission
[ERROR] : DataReductionProxySettingListener: No DRP key due to exception:java.lang.ClassNotFoundException: com.android.webview.chromium.Drp
[WARN] : art: Attempt to remove non-JNI local reference, dumping thread
[WARN] : AwContents: onDetachedFromWindow called when already detached. Ignoring
[WARN] : art: Attempt to remove non-JNI local reference, dumping thread
[WARN] : art: Attempt to remove non-JNI local reference, dumping thread
[WARN] : art: Attempt to remove non-JNI local reference, dumping thread
[WARN] : art: Attempt to remove non-JNI local reference, dumping thread
[WARN] : art: Attempt to remove non-JNI local reference, dumping thread
[WARN] : art: Attempt to remove non-JNI local reference, dumping thread
[ERROR] : TiHTTPClient: (TiHttpClient-14) [1560,1630] HTTP Error (java.io.IOException): 404 : Not Found
[ERROR] : TiHTTPClient: java.io.IOException: 404 : Not Found
[ERROR] : TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1217)
[ERROR] : TiHTTPClient: at java.lang.Thread.run(Thread.java:818)
[INFO] : Choreographer: Skipped 59 frames! The application may be doing too much work on its main thread.
[WARN] : chromium: [WARNING:data_reduction_proxy_config.cc(423)] SPDY proxy OFF at startup
[ERROR] : GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
[WARN] : GooglePlayServicesUtil: Cannot find Google Play services package name.
[WARN] : GooglePlayServicesUtil: android.content.pm.PackageManager$NameNotFoundException: com.google.android.gms
[WARN] : GooglePlayServicesUtil: at android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:137)
[WARN] : GooglePlayServicesUtil: at com.google.android.gms.internal.zzsh.getPackageInfo(Unknown Source)
[WARN] : GooglePlayServicesUtil: at com.google.android.gms.common.zze.zzby(Unknown Source)
[WARN] : GooglePlayServicesUtil: at com.google.android.gms.common.zze.zzbx(Unknown Source)
[WARN] : GooglePlayServicesUtil: at com.google.android.gms.common.zze.zzbt(Unknown Source)
[WARN] : GooglePlayServicesUtil: at com.google.android.gms.common.zze.isGooglePlayServicesAvailable(Unknown Source)
[WARN] : GooglePlayServicesUtil: at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
[WARN] : GooglePlayServicesUtil: at com.google.android.gms.maps.internal.zzai.zzdq(Unknown Source)
[WARN] : GooglePlayServicesUtil: at com.google.android.gms.maps.internal.zzai.zzdp(Unknown Source)
[WARN] : GooglePlayServicesUtil: at com.google.android.gms.maps.MapsInitializer.initialize(Unknown Source)
[WARN] : GooglePlayServicesUtil: at com.google.android.gms.maps.SupportMapFragment$zzb.zzbru(Unknown Source)
[WARN] : GooglePlayServicesUtil: at com.google.android.gms.maps.SupportMapFragment$zzb.zza(Unknown Source)
[WARN] : GooglePlayServicesUtil: at com.google.android.gms.dynamic.zza.zza(Unknown Source)
[WARN] : GooglePlayServicesUtil: at com.google.android.gms.dynamic.zza.onCreate(Unknown Source)
[WARN] : GooglePlayServicesUtil: at com.google.android.gms.maps.SupportMapFragment.onCreate(Unknown Source)
[WARN] : GooglePlayServicesUtil: at android.support.v4.app.Fragment.performCreate(Fragment.java:1939)
[WARN] : GooglePlayServicesUtil: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1029)
[WARN] : GooglePlayServicesUtil: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1248)
[WARN] : GooglePlayServicesUtil: at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
[WARN] : GooglePlayServicesUtil: at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.ja va:1613)
[WARN] : GooglePlayServicesUtil: at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:517)
[WARN] : GooglePlayServicesUtil: at android.os.Handler.handleCallback(Handler.java:739)
[WARN] : GooglePlayServicesUtil: at android.os.Handler.dispatchMessage(Handler.java:95)
[WARN] : GooglePlayServicesUtil: at android.os.Looper.loop(Looper.java:148)
[WARN] : GooglePlayServicesUtil: at android.app.ActivityThread.main(ActivityThread.java:5417)
[WARN] : GooglePlayServicesUtil: at java.lang.reflect.Method.invoke(Native Method)
[WARN] : GooglePlayServicesUtil: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
[WARN] : GooglePlayServicesUtil: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
[WARN] : GooglePlayServicesUtil: Google Play Store is missing.
[ERROR] : GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
[WARN] : GooglePlayServicesUtil: Google Play Store is missing.
[ERROR] : GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
[WARN] : GooglePlayServicesUtil: Google Play Store is missing.
[ERROR] : GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
[WARN] : GooglePlayServicesUtil: Google Play Store is missing.
[ERROR] : GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
[WARN] : GooglePlayServicesUtil: Google Play Store is missing.
[ERROR] : TiApplication: (main) [200,1830] Sending event: exception on thread: main msg:java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/R$string;; Titanium 6.0.0,2016/11/13 01:23,undefined
[ERROR] : TiApplication: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/R$string;
[ERROR] : TiApplication: at com.google.android.gms.common.internal.zzi.zzi(Unknown Source)
[ERROR] : TiApplication: at com.google.android.gms.dynamic.zza.zzb(Unknown Source)
[ERROR] : TiApplication: at com.google.android.gms.dynamic.zza.zza(Unknown Source)
[ERROR] : TiApplication: at com.google.android.gms.dynamic.zza.onCreateView(Unknown Source)
[ERROR] : TiApplication: at com.google.android.gms.maps.SupportMapFragment.onCreateView(Unknown Source)
[ERROR] : TiApplication: at android.support.v4.app.Fragment.performCreateView(Fragment.java:1962)
[ERROR] : TiApplication: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
[ERROR] : TiApplication: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1248)
[ERROR] : TiApplication: at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
[ERROR] : TiApplication: at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1613)
[ERROR] : TiApplication: at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:517)
[ERROR] : TiApplication: at android.os.Handler.handleCallback(Handler.java:739)
[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:95)
[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:148)
[ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5417)
[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Native Method)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
[ERROR] : TiApplication: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.R$string" on path: DexPathList[[zip file "/data/app/ru.r70.avtospravka-2/base.apk"],nativeLibraryDirectories=[/data/app/ru.r70.avtospravka-2/lib/x86, /data/app/ru.r70.avtospravka-2/base.apk!/lib/x86, /vendor/lib, /system/lib]]
[ERROR] : TiApplication: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
[ERROR] : TiApplication: at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
[ERROR] : TiApplication: at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
[ERROR] : TiApplication: ... 18 more
[ERROR] : TiApplication: Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.R$string
[ERROR] : TiApplication: at java.lang.Class.classForName(Native Method)
[ERROR] : TiApplication: at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
[ERROR] : TiApplication: at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
[ERROR] : TiApplication: at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
[ERROR] : TiApplication: ... 19 more
[ERROR] : TiApplication: Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
[ERROR] : W/InputConnectionWrapper.ICC(1654): Timed out waiting on IInputContextCallback
[ERROR] : W/InputConnectionWrapper.ICC(1654): Timed out waiting on IInputContextCallback
[ERROR] : W/InputConnectionWrapper.ICC(1654): Timed out waiting on IInputContextCallback
[ERROR] : W/InputConnectionWrapper.ICC(1654): Timed out waiting on IInputContextCallback
[ERROR] : W/InputConnectionWrapper.ICC(1654): Timed out waiting on IInputContextCallback
[ERROR] : W/InputConnectionWrapper.ICC(1654): Timed out waiting on IInputContextCallback
[ERROR] : W/InputConnectionWrapper.ICC(1654): Timed out waiting on IInputContextCallback
[ERROR] : W/InputConnectionWrapper.ICC(1654): Timed out waiting on IInputContextCallback
[ERROR] : W/InputConnectionWrapper.ICC(1654): Timed out waiting on IInputContextCallback
[ERROR] : W/InputConnectionWrapper.ICC(1654): Timed out waiting on IInputContextCallback
[ERROR] : W/InputConnectionWrapper.ICC(1654): Timed out waiting on IInputContextCallback
[ERROR] : W/InputConnectionWrapper.ICC(1654): Timed out waiting on IInputContextCallback
[ERROR] : W/InputConnectionWrapper.ICC(1654): Timed out waiting on IInputContextCallback
<Activity>
にGoogleがサービスを演じるのAndroid SDK Managerがチェックされます。しかしisGooglePlayServicesAvailable()return [エラー]:GooglePlayServicesUtil:Google Playサービスのリソースが見つかりませんでした。リソースが含まれていることを確認するには、プロジェクトの構成を確認してください。 – Palkinあなたは、SDKマネージャでは、インストールされている(または利用可能なアップデート)だけでなく、左の青がチェックされていることを意味しますか? Google Playサービスが実際にインストールされていてもアプリがそれを検出しない場合は、プッシュ実装中にこの問題が発生していたため、同じアプリID(別のものを最初に取得)の別のプロジェクトを作成し、アプリを削除してからデバイスから削除してください。 また、別のデバイスで実際の問題をより短時間で知ることができます。 –