Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails #2

Open
gs-ts opened this issue Mar 30, 2021 · 1 comment
Open

Build fails #2

gs-ts opened this issue Mar 30, 2021 · 1 comment

Comments

@gs-ts
Copy link

gs-ts commented Mar 30, 2021

So I cloned the repo and I checked out the branch for Part 15, and finally took the api key from newsapi.org.

Then in the gradle.properties file, I added the key:

# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official

news_api_access_key=def8c600000000001

Attempt to build:
:app:compileDebugKotlin FAILED

e: .../codinginflow/mvvmnewsapp/api/NewsApi.kt: (12, 29): Const 'val' initializer should be a constant value
e: .../codinginflow/mvvmnewsapp/api/NewsApi.kt: (15, 14): An annotation argument must be a compile-time constant
e: .../codinginflow/mvvmnewsapp/api/NewsApi.kt: (19, 14): An annotation argument must be a compile-time constant
@rohitjakhar
Copy link

add key as string ex. "def8c600000000001"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants