Getting "An annotation argument must be a compile-time constant"
See original GitHub issueI’m getting the above error at
@GET("articles?source=google-news&apiKey=" + BuildConfig.NEWS_API_KEY)
in NewsSourceService.kt
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Apologies. Added
NEWS_API_KEY=12345678
instead ofNEWS_API_KEY="12345678"
Missed"
Nice app. Thanks.Sure. No problem.