question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting "An annotation argument must be a compile-time constant"

See original GitHub issue

I’m getting the above error at @GET("articles?source=google-news&apiKey=" + BuildConfig.NEWS_API_KEY) in NewsSourceService.kt

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sumanth-cullicommented, Sep 14, 2018

Apologies. Added NEWS_API_KEY=12345678 instead of NEWS_API_KEY="12345678" Missed " Nice app. Thanks.

0reactions
AkshayChordiyacommented, Sep 14, 2018

Sure. No problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

An Annotation argument must be a compile time constant
While working with Room i was creating table. it was working fine. @Daointerface UserDao { @Query("SELECT * FROM user") fun ...
Read more >
Misleading error "An annotation argument must be a compile ...
The error message implied, apparently incorrectly, that a Java class was not a compile-time constant (It seems to me that it is!), when...
Read more >
Spring @Value Annotation in Kotlin Throws an Error Must Be ...
The error I was getting was: An annotation argument must be a compile-time constant. Looking at the code from Spring, it's clear that...
Read more >
Convert Java annotation non-constant field to Kotlin
Default value of annotation parameter must be a compile-time constant. @Target(AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.
Read more >
An annotation argument must be a compile-time constant-kotlin
What you need to do is convert your Constants class to an object like below object Constants { const val BASE_URL = "http://istiak.ga/app/"...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found