@Bellkross

Android studio Проблема при запуске проекта, что делать?

Очень долго ищу решение, не знаю, в чем дело.
При запуске любого проекта в android studio выдает такую ошибку:
"Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> Unexpected lock protocol found in lock file. Expected 3, found 0."
Гуглил, удалял папку "gradle."
Менял версии android и билд версии на 22,23,24
Переустанавливалandroid studio
Переменную среды менял(Но с ней оказалось все ок)
Переустанавливал JDK, SDK
Не знаю, что делать, уже отчаиваюсь, кто может - помогите.

Massages Gradle Build:
Information:Gradle tasks [:app:clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:assembleDebug]
:app:clean
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2411Library
:app:prepareComAndroidSupportAppcompatV72411Library
:app:prepareComAndroidSupportSupportV42411Library
:app:prepareComAndroidSupportSupportVectorDrawable2411Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:mergeDebugShaders
:app:compileDebugShaders
:app:generateDebugAssets
:app:mergeDebugAssets
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources
:app:mergeDebugResources
Exception in thread "png-cruncher_28" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at D:\AndroidSDK\build-tools\24.0.1\aapt.exe can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
	at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
	at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
	at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
	at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_23" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at D:\AndroidSDK\build-tools\24.0.1\aapt.exe can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
	at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
	at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
	at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
	at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_25" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at D:\AndroidSDK\build-tools\24.0.1\aapt.exe can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
	at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
	at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
	at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
	at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_30" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at D:\AndroidSDK\build-tools\24.0.1\aapt.exe can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
	at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
	at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
	at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
	at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_21" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at D:\AndroidSDK\build-tools\24.0.1\aapt.exe can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
	at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
	at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
	at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
	at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_22" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at D:\AndroidSDK\build-tools\24.0.1\aapt.exe can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
	at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
	at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
	at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
	at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_24" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at D:\AndroidSDK\build-tools\24.0.1\aapt.exe can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
	at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
	at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
	at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
	at java.lang.Thread.run(Thread.java:745)
:app:processDebugManifest
:app:processDebugResources
:app:generateDebugSources
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareDebugAndroidTestDependencies
:app:compileDebugAndroidTestAidl
:app:processDebugAndroidTestManifest
:app:compileDebugAndroidTestRenderscript
:app:generateDebugAndroidTestBuildConfig
:app:mergeDebugAndroidTestShaders
:app:compileDebugAndroidTestShaders
:app:generateDebugAndroidTestAssets
:app:mergeDebugAndroidTestAssets
:app:generateDebugAndroidTestResValues UP-TO-DATE
:app:generateDebugAndroidTestResources
:app:mergeDebugAndroidTestResources
:app:processDebugAndroidTestResources
:app:generateDebugAndroidTestSources
:app:mockableAndroidJar UP-TO-DATE
:app:preDebugUnitTestBuild UP-TO-DATE
:app:prepareDebugUnitTestDependencies
:app:incrementalDebugJavaCompilationSafeguard
:app:compileDebugJavaWithJavac
:app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
:app:compileDebugJavaWithJavac FAILED
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> Unexpected lock protocol found in lock file. Expected 3, found 0.
Information:BUILD FAILED
Information:Total time: 1 mins 58.653 secs
Information:1 error
Information:0 warnings
Information:See complete output in console


build.gradle:
apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.1"

    defaultConfig {
        applicationId "com.example.myapplication"
        minSdkVersion 15
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:24.1.1'
}
  • Вопрос задан
  • 2657 просмотров
Решения вопроса 1
@aol-nnov
это и это похоже на правду. ужели "долго искал и не находил"?! или таки не помогло?
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы