I am getting the following error
java.util.NoSuchElementException
When I click on it to reveal more information, this is what it says.
Caused by: java.util.NoSuchElementException
Unlike previous errors, it doesn't show where the error is coming from. How do I fix this issue? I am looking through all my files and nothing seems to be giving me an error. Any tips or suggestions are appreciated.
@Izabela is right. However, in my case, I navigated to File -> Settings -> Build,Execution,Deployment -> Instant Run and disabled it by simply unchecking the topmost checkbox (which was enabled by default). Its working perfectly for me (till now). I am running Android Studio 3.0.1 on Ubuntu 16.04 LTS.
try adding this to your gradle.properties file
android.enableAapt2=true
There are two ways to fix this issue:
1st approach for Android studio 3.1 or <3.2
- Update gradle.properties file with
android.enableAapt2=false
- Disable Instant Run(Ctrl+shift+A(win+Linux) or Command+shift+A(Mac) then search for Instant run).
2nd approach for Android studio 3.2 or later:
- Update Android studio to 3.2
- Update gradle.properties file with
android.enableAapt2=true
- You can keep remain enable the Instant run now.