2016-06-22 19 views
26

ogni volta che provo a fare funzionare il mio app ottengo questo errore:Errore: esecuzione non riuscita per l'attività ': app: transformClassesWithInstantRunSlicerForDebug'. > Java.io.IOException:

errore: Esecuzione non riuscita per il compito

:app:transformClassesWithInstantRunSlicerForDebug'. 
java.io.IOException: Failed to delete 

C:\Users\ashis\AndroidStudioProjects\FirstApp\app\build\intermediates\instant-run-support\debug\restart-changes.txt** 

ed ecco l'output:

Informazioni: Gradle compiti

[:app:assembleDebug] :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:prepareComAndroidSupportAnimatedVectorDrawable2340Library UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72340Library UP-TO-DATE :app:prepareComAndroidSupportSupportV42340Library UP-TO-DATE :app:prepareComAndroidSupportSupportVectorDrawable2340Library UP-TO-DATE :app:prepareDebugDependencies :app:compileDebugAidl UP-TO-DATE :app:compileDebugRenderscript UP-TO-DATE :app:generateDebugBuildConfig UP-TO-DATE :app:mergeDebugShaders UP-TO-DATE :app:compileDebugShaders UP-TO-DATE :app:generateDebugAssets UP-TO-DATE :app:mergeDebugAssets UP-TO-DATE :app:generateDebugResValues UP-TO-DATE :app:generateDebugResources UP-TO-DATE :app:mergeDebugResources UP-TO-DATE :app:processDebugManifest UP-TO-DATE :app:processDebugResources UP-TO-DATE :app:generateDebugSources UP-TO-DATE :app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE :app:compileDebugJavaWithJavac UP-TO-DATE :app:compileDebugNdk UP-TO-DATE :app:compileDebugSources UP-TO-DATE :app:buildInfoDebugLoader :app:transformClassesWithExtractJarsForDebug UP-TO-DATE :app:transformClassesWithInstantRunVerifierForDebug UP-TO-DATE :app:transformClassesWithJavaResourcesVerifierForDebug UP-TO-DATE :app:mergeDebugJniLibFolders UP-TO-DATE :app:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE :app:processDebugJavaRes UP-TO-DATE :app:transformResourcesWithMergeJavaResForDebug UP-TO-DATE :app:transformResourcesAndNative_libsWithJavaResourcesVerifierForDebug UP-TO-DATE :app:transformClassesWithInstantRunForDebug UP-TO-DATE :app:transformClasses_enhancedWithInstant+reloadDexForDebug UP-TO-DATE :app:incrementalDebugTasks :app:prePackageMarkerForDebug :app:fastDeployDebugExtractor UP-TO-DATE :app:generateDebugInstantRunAppInfo UP-TO-DATE :app:coldswapKickerDebug :app:transformClassesWithInstantRunSlicerForDebug FAILED Error:Execution failed for task ':app:transformClassesWithInstantRunSlicerForDebug'. java.io.IOException: Failed to delete C:\Users\ashis\AndroidStudioProjects\FirstApp\app\build\intermediates\instant-run-support\debug\restart-changes.txt Information:BUILD FAILED Information:Total time: 1 mins 6.761 secs Information:1 error Information:0 warnings Information:See complete output in console

risposta

56

: app: TRA nsformClassesWithInstantRunSlicerForDebug'. java.io.IOException: impossibile eliminare

- provare a pulire il progetto e ricostruire il progetto.

Da @Kael: Un clean viene eseguito tramite Build -> Clean Project o Build -> Rebuild Project.

+5

(Per coloro che si stanno chiedendo, questo è 'Costruire Menu> Clean project' e' costruire Menu> Rebuild project') – kael

+4

sua non funziona, quando scatto progetto pulirlo mostra lo stesso errore "Error: Esecuzione non riuscita per task ': app: mergeDebugResources'. > java.io.IOException: impossibile eliminare il percorso 'xxxxxxxxxx \ app \ build \ intermediates \ res \ merged \ debug \ drawable-hdpi-v4'. " – Prasad

+0

@Prasad: lo stesso qui. – Veverke

1

cercare di pulire progetto e ricostruire progetto dalla Build Menu > Clean Project and Build Menu > Rebuild provare a riavviare Android Studio o utilizzare Android Studio su diversi utenti

8

Nella mia situazione Build Menu > Clean Project and Build Menu > Rebuild non ha funzionato. Invece ho dovuto eliminare manualmente la cartella build dal filesystem (usando Finder su OSX, Explorer su Win).

+2

grazie molto amico ... ho risolto il problema in questo modo .. –

1

I Execution non è riuscito per l'attività ': app: generateDebugBuildConfig'. errore, pulizia e ricostruzione del progetto non funzionava.

  1. ho aggiunto alla mia C:\Users\...\AppData\Local\Android\sdk\tools variabile PATH Ambiente.
  2. Ho chiuso Android Studio e Vscode che stavo usando per modificare i file di progetto. (Questo è molto importante)
  3. Ho eseguito il progetto e ha funzionato bene.
Problemi correlati