1
votes

I accidentally made my package com.example.appname so when I tried to publish it, it wouldn't go through. I changed the package name to myname.app1.appname and everything works the same except my maps implementation. I'm using v2 and it worked before I changed my package but now the map is just a white screen with google in the corner and zoom buttons. The log cat says: E/Google Maps Android API(18983): Authorization failure. Please see https://developers.google.com/maps/documentation/android/start for how to correctly set up the map.

I've followed every guide I could find, and read every single question that had anything to do with this, nothing is fixing it.

Map xml

<fragment
         android:id="@+id/the_map"
         android:layout_width="match_parent"
         android:layout_height="450dp"
         android:name="com.google.android.gms.maps.MapFragment"
         map:cameraTargetLat="43.804871"
         map:cameraTargetLng="-79.137248"
         map:cameraTilt="45"
         map:cameraZoom="14"/>

Map java

GoogleMap googleMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.the_map)).getMap();
1
did you change the package name in the manifest file too after you changed your package name?Jerry Wattre
Yeah, I'm fairly sure I changed the package name correctly in my code, I think I've messed up something in the way google uses the package name.user3154527
Did you also changed the packagenames of the permissions (-> my.package.name.permission.MAPS_RECEIVE) in the Manifest?owe
Unfortunately, yes I have already done that.user3154527

1 Answers

1
votes
  1. Go to Google Developers Console (https://cloud.google.com/console/)
  2. Open [APIs & auth] - [Credentials] in the left tab
  3. Check the table captioned "Key for Android applications" in "Public API access"
  4. You should see a pair of your fingerprint and package name which you entered before. Click on "Edit allowed Android applications" and change the package name.