2016-09-09 10 views
0

Googleマップと統合すると非常にイライラしています。 android-app://app.facebook.android.com.googlemaps:アンドロイドGoogleマップjava.lang.IllegalArgumentException:AppIndex

これはエラー

java.lang.IllegalArgumentException: AppIndex: The android-app URI host must match the package name and follow the format android-app://<package_name>/<scheme>/<host_path>. 

提供URIです:誰かが親切に以下のエラーを引き起こすことが、私が間違ってやって説明することができます/ http/host/path

答えて

0

答えを見つけたので、別のソースからコードをコピーしました。私はちょうど私の主な活動のパッケージ名と一致するapp.facebook.android.com.googlemapsを変更しなければならなかった

@Override 
    protected void onStart() { 
     googleApiClient.connect(); 
     super.onStart(); 
     // ATTENTION: This was auto-generated to implement the App Indexing API. 
     // See https://g.co/AppIndexing/AndroidStudio for more information. 
     Action viewAction = Action.newAction(
       Action.TYPE_VIEW, // TODO: choose an action type. 
       "Map Page", // TODO: Define a title for the content shown. 
       // TODO: If you have web page content that matches this app activity's content, 
       // make sure this auto-generated web page URL is correct. 
       // Otherwise, set the URL to null. 
       Uri.parse("http://host/path"), 
       // TODO: Make sure this auto-generated app URL is correct. 
       Uri.parse("android-app://app.facebook.android.com.googlemaps/http/host/path") 
     ); 
     AppIndex.AppIndexApi.start(googleApiClient, viewAction); 
    } 

:これは次のように例外を投げていたONSTART方法が見えた方法です。

関連する問題