質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
XML

XMLは仕様の1つで、マークアップ言語群を構築するために使われています。

IDE

IDE、統合開発環境((Integrated Development Environment)とは、テキストエディタ以上の機能を提供して、ソフトウェア開発を効率をあげるコンピュータプログラムを指す。

Java

Javaは、1995年にサン・マイクロシステムズが開発したプログラミング言語です。表記法はC言語に似ていますが、既存のプログラミング言語の短所を踏まえていちから設計されており、最初からオブジェクト指向性を備えてデザインされています。セキュリティ面が強力であることや、ネットワーク環境での利用に向いていることが特徴です。Javaで作られたソフトウェアは基本的にいかなるプラットフォームでも作動します。

Android

Androidは、Google社が開発したスマートフォンやタブレットなど携帯端末向けのプラットフォームです。 カーネル・ミドルウェア・ユーザーインターフェイス・ウェブブラウザ・電話帳などのアプリケーションやソフトウェアをひとつにまとめて構成。 カーネル・ライブラリ・ランタイムはほとんどがC言語/C++、アプリケーションなどはJavaSEのサブセットとAndroid環境で書かれています。

Android Studio

Android Studioは、 Google社によって開発された、 Androidのネイティブアプリケーション開発に特化した統合開発ツールです。

Q&A

解決済

1回答

918閲覧

android studio でgoogle Mapsが表示されない

ritsukisan

総合スコア10

XML

XMLは仕様の1つで、マークアップ言語群を構築するために使われています。

IDE

IDE、統合開発環境((Integrated Development Environment)とは、テキストエディタ以上の機能を提供して、ソフトウェア開発を効率をあげるコンピュータプログラムを指す。

Java

Javaは、1995年にサン・マイクロシステムズが開発したプログラミング言語です。表記法はC言語に似ていますが、既存のプログラミング言語の短所を踏まえていちから設計されており、最初からオブジェクト指向性を備えてデザインされています。セキュリティ面が強力であることや、ネットワーク環境での利用に向いていることが特徴です。Javaで作られたソフトウェアは基本的にいかなるプラットフォームでも作動します。

Android

Androidは、Google社が開発したスマートフォンやタブレットなど携帯端末向けのプラットフォームです。 カーネル・ミドルウェア・ユーザーインターフェイス・ウェブブラウザ・電話帳などのアプリケーションやソフトウェアをひとつにまとめて構成。 カーネル・ライブラリ・ランタイムはほとんどがC言語/C++、アプリケーションなどはJavaSEのサブセットとAndroid環境で書かれています。

Android Studio

Android Studioは、 Google社によって開発された、 Androidのネイティブアプリケーション開発に特化した統合開発ツールです。

0グッド

0クリップ

投稿2019/04/23 02:48

前提・実現したいこと

android studio で google Mapを表示したい

発生している問題・エラーメッセージ

E/ServiceManager: try to find service failed, not allowed access from isolated processes.
nsure that the "Google Maps Android API v2" is enabled. Ensure that the following Android Key exists: API Key: 取得したapiキーが表示されていました Android Application (<cert_fingerprint>;<package_name>):

該当のソースコード

ソースコード

前提・実現したいこと

google Mapsが表示されるようにしたい

該当のソースコード

java

1import android.support.v4.app.FragmentActivity; 2import android.os.Bundle; 3 4import com.google.android.gms.maps.CameraUpdateFactory; 5import com.google.android.gms.maps.GoogleMap; 6import com.google.android.gms.maps.OnMapReadyCallback; 7import com.google.android.gms.maps.SupportMapFragment; 8import com.google.android.gms.maps.model.LatLng; 9import com.google.android.gms.maps.model.MarkerOptions; 10 11public class MapsActivity extends FragmentActivity implements OnMapReadyCallback { 12 13 private GoogleMap mMap; 14 15 @Override 16 protected void onCreate(Bundle savedInstanceState) { 17 super.onCreate(savedInstanceState); 18 setContentView(R.layout.activity_maps); 19 // Obtain the SupportMapFragment and get notified when the map is ready to be used. 20 SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager() 21 .findFragmentById(R.id.map); 22 mapFragment.getMapAsync(this); 23 } 24 25 26 /** 27 * Manipulates the map once available. 28 * This callback is triggered when the map is ready to be used. 29 * This is where we can add markers or lines, add listeners or move the camera. In this case, 30 * we just add a marker near Sydney, Australia. 31 * If Google Play services is not installed on the device, the user will be prompted to install 32 * it inside the SupportMapFragment. This method will only be triggered once the user has 33 * installed Google Play services and returned to the app. 34 */ 35 @Override 36 public void onMapReady(GoogleMap googleMap) { 37 mMap = googleMap; 38 39 // Add a marker in Sydney and move the camera 40 LatLng sydney = new LatLng(-34, 151); 41 mMap.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney")); 42 mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney)); 43 } 44}

xml

1<resources> 2 <!-- 3 TODO: Before you run your application, you need a Google Maps API key. 4 5 To get one, follow this link, follow the directions and press "Create" at the end: 6 7 (linkが貼ってありました) 8 9 You can also add your credentials to an existing key, using these values: 10 11 Package name: 12 13 14 SHA-1 certificate fingerprint: 15 16 17 Alternatively, follow the directions here: 18 https://developers.google.com/maps/documentation/android/start#get-key 19 20 Once you have your key (it starts with "AIza"), replace the "google_maps_key" 21 string in this file. 22 --> 23 <string name="google_maps_key" templateMergeStrategy="preserve" translatable="false"></string> 24</resources> 25

試したこと

API keyを記述しました

補足情報(FW/ツールのバージョンなど)

API key 以外に何も記述していません。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

自己解決

APIをリフレッシュする操作を何度か繰り返したらマップが表示されました。

投稿2019/04/23 07:27

ritsukisan

総合スコア10

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問