The solution to this is easy. Delete the .gradle folder in your project folder. Then look for the icon in Android Studio (see image).
It says Sync Project with Gradle Files. Click that button and all should be well.
So when I tried to open a file input dialog, I got this error Error: [$rootScope:inprog]. This happens because there can be only one $digest or $apply operation in progress.
To avoid this problem, you can do two things:
1) The Angular JS way by adding a timeout. Make sure to include $timeout and inject it in your controller.
2) The old fashion way by adding onclick=”document.getElementById(‘id’).click()” to the input file element.
The solution is to use the variable returned to you, say from an asynchronous call as a JSON Object rather than trying to parse it again.