0 down vote favorite 
<http://stackoverflow.com/questions/38447215/android-studio-suddenly-refusing-to-use-api-23-rather-than-24#>
 

I have been developing my app for a couple of weeks, routinely rebuilding 
without errors. Then something weird happened to my Windows system. It's as 
if all my Android Studio settings have been lost. Normally, when I start 
Android Studio, it automatically loads my project. Today it didn't and I 
had to open the project manually.


I then tried to open one of my layout XML files and it refused to render it 
saying "Android N requires the IDE to be running with Java 1.8". I 
remembered I had this problem before. I clicked on the little green man 
with a 24 next to him and chose "API 23: Android API 23". Problem solved. I 
can now see my activity layout. Except...


Unfortunately, if I now close Android Studio and re-open it, it forgets 
that I selected API 23 and again says "Android N requires..." and I have to 
explicitly choose API 23 again. Why isn't it remembering like it used to?


However, that's a mere inconvenience compared with the other problem. Now, 
when I try to rebuild my app I get the error "compileSdkVersion 
'Android-24' requires JDK 1.8 or later to compile." It wasn't saying that 
yesterday. What's gone wrong?


How do I convince Android Studio, permanently, that I want to use API 23 
and not 24 for rendering and how do I fix the compilation error?

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/f7c5a560-7ab8-451b-9aa8-d13f505e6d7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to