handris
handris

Reputation: 2109

Running app from Android Studio and installing by apk yields different results

I have created an app which runs perfectly when I run it from Android Studio. It works on an emulator and on a connected physical device as well.

However, when I create a signed apk, all I get is an empty gray screen.

Here is my app in github:

https://github.com/handriss/kinizsi

And here is my app in the app store:

https://play.google.com/store/apps/details?id=com.kinizsi.hinkel.kinizsisample

It is my first app, and consquently the first app I wish to publish.

What am I doing wrong?

Upvotes: 1

Views: 297

Answers (1)

Ken Wolf
Ken Wolf

Reputation: 23269

You need to fill in your google maps API key

<string name="google_maps_key" templateMergeStrategy="preserve" translatable="false">
    YOUR_KEY_HERE
</string>

in release/res/values/google_maps_api.xml

When you build a production release it (potentially) uses a different set of resources and configurations so you can for example have lots of logs in debug mode but not in release more or use different API keys for testing.

In your case in release mode you have not provided an api key for Google to use so it is loading a blank screen.

Upvotes: 1

Related Questions