问题
I am going to start develop application for fire TV i can create an application using Eclipse successfully, But when i try the same procedure to create new application which compile with Firetv SDK got some Gradle error on android studio.. i am stuck with this issues for around one week.
The error is Gradle app neame project refresh failed:
Unexpected lock protocol found in lock file. Expected 3, found 0.
Gradle settings
I searched lot about this error in google but cant get any solution Sorry for my bad English.
My even log says:
Gradle 'Test' project refresh failed: Unexpected lock protocol found in lock file. Expected 3, found 0. Gradle settings My build gradle
apply plugin: 'android'
android {
compileSdkVersion 17
buildToolsVersion "19.0.3"
defaultConfig {
minSdkVersion 17
targetSdkVersion 17
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
回答1:
My case, delete ~/.gradle/
and suddenly all working well again.
good luck!
回答2:
Invalidate Caches And Restart Also Works. Try It Out By Going To File and selecting Invalidate caches and restart
回答3:
Just go to Android Studio -> File -> Close project. After closing the project,reopen it afresh. This solved the problem for me.
回答4:
I couldn't understand about ~/.gradle/ folder... but now I got it and solved! delete here folder!
来源:https://stackoverflow.com/questions/23196254/how-to-start-develop-application-for-fire-os-in-android-studio-ide