I suddenly bump into the following error why trying to build my project
C:\Users\Admin\AppData\Local\Android\sdk\platforms\android-27\android.jar: error: Inconsistent information
:app:processDebugResources FAILED
FAILURE: Build failed with an exception.
I tried Rebuild Project
and Invalidate Caches / Restart
, but it didn't solve the problem.
I guess the SDK jar files are corrupted, and I probably need to reinstall the SDK.
How to reinstall Android Studio Platform SDK?
Goto Tools -> SDK Manager
.
In the Android SDK -> SDK Platforms
tab, check Show Package Details
at the bottom.
Select the appropriate SDK (8.1 Oreo SDK 27 for my case), unchecked Android SDK Platform *
and click OK
.
To install the SDK again, just build the current project and it will automatically download and install the required SDK.
Configuration on demand is an incubating feature.
Checking the license for package Android SDK Platform 27 in C:\Users\Admin\AppData\Local\Android\sdk\licenses
License for package Android SDK Platform 27 accepted.
Preparing "Install Android SDK Platform 27 (revision: 1)".
"Install Android SDK Platform 27 (revision: 1)" ready.
Installing Android SDK Platform 27 in C:\Users\Admin\AppData\Local\Android\sdk\platforms\android-27
"Install Android SDK Platform 27 (revision: 1)" complete.
"Install Android SDK Platform 27 (revision: 1)" finished.
Reinstall Android Platform SDK did solve the android.jar: error: Inconsistent information
error.