Nishant Mittal avatar image
Nishant Mittal asked

Android Studio Cannot find API Key - Login With Amazon

In my Android Studio project, I have got my LWA API key and saved in in the parent directory > assets folder as api_key.txt and also in my app>build>intermediates>assets folder.

Still my it cannot find the API Key. Log :

getAppInfoFromAPIKey : packageName=:<obscured>
            D  Finding API Key for :<obscured>
            I  Unable to get api key asset document: api_key.txt
           W  Unable to get API Key from Assests
         I  Attempting to parse API Key from meta data in Android manifest
         I  Attempting to parse API Key from meta data in Android manifest
           D  Begin decoding API Key for packageName=:<obscured>
         D  APIKey:<obscured>
        W  Unable to decode APIKey for pkg=com.example.test_itt_2
        E  FATAL EXCEPTION: main
java.lang.IllegalArgumentException: Invalid API Key
at com.example.test_itt_2.WorkflowActivity$1.onClick(
at android.view.View.performClick(
at android.view.View.performClickInternal(
at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
at android.view.View$
at android.os.Handler.handleCallback(
at android.os.Handler.dispatchMessage(
at android.os.Looper.loopOnce(
at android.os.Looper.loop(
at java.lang.reflect.Method.invoke(Native Method)

I tried running the gradle signingReport command again to update the signingReport but nothing changed.

login with amazonandroid
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers