Android Studio 2 error :app:compileDebugJavaWithJack - android-studio

This is the complete error from Android Studio 2.1.1. I know this code compiles because on other PC it does, just not on this one which has Windows 10 x64. All other projects fail with similar result.
Error:Execution failed for task ':app:compileDebugJavaWithJack'.
> java.lang.RuntimeException: java.lang.AssertionError: com.android.jack.library.LibraryIOException: I/O error when accessing file 'I:\Android\KeepVidDownloader\Android\app\build\intermediates\packaged\debug\classes.zip': Failed to delete directory 'C:\Users\BCDIAC~1\AppData\Local\Temp\vfs-1464787788985-0'
For Build -> Clean Project I have used the solution from here https://stackoverflow.com/a/32924320/1958032
I think that there could be a similar solution for running/making the app.
How to solve this?

This issue is a conflict between antivirus and Android Studio.
In my case using Avira, Windows 10 and Android Studio 2.2.
I just disabled Avira for the first build and enabled it again when build was complete.
No need to do this every time- only at the first build.

I had a similar problem and solved it by File->Invalidate Caches and Restart.

Related

Gradle Distribution URL issue in Android Studio

Facing error -"The specified Gradle distribution 'https://services.gradle.org/distributions/gradle-6.5-all.zip' does not exist." when I'm running android studio normally.
But if I start the android studio as administrator above error is not coming.
I tried deleting the .gradle and .idea file and restarting the android studio, but same error is coming.
So, after trying out lot of solutions on stack nth helped and sort out this problem. Eventually, I had to restore my android studio to default settings. So, that how my problem was resolved.

Flutter Error Failed to extract manifest from APK: Exit code -1073741515

Getting this error in android studio 3.5
Android Version 3.5
SDK 28
flutter latest version
Any one help me with this error? Getting this in windows 7 ultimate
Failed to extract manifest from APK: Exit code -1073741515 from: C:\Users\Shahryar Ahmed\AppData\Local\Android\sdk\build-tools\29.0.2\aapt dump xmltree C:\Users\Shahryar Ahmed\AndroidStudioProjects\flutter_app\build\app\outputs\apk\app.apk AndroidManifest.xml.
No application found for TargetPlatform.android_arm.
Is your project missing an android\app\src\main\AndroidManifest.xml?
Consider running "flutter create ." to create one.
Try to do a
flutter clean
This solved lots of problems for me
From Menu Goto Tools->Flutter->Flutter Clean.
as shown in below picture.
File->Invalidate Caches/Restart..
I encountered the same problem and I fixed it by deleting the app.apk in the build/app/ouputs/apk directory and it worked.
This problem happened to me .
and the error was that the file aapt.exe in this ( C:\Users\username\AppData\Local\Android\sdk\build-tools\29.0.2\aapt.exe) is opened by antivirus .
the solution is : stop the antivirus and run again it will work .
also :
you can double click on aapt.exe file , if it opened by another program it will show what is this program , so you can stop or close this program and run again .
Consider opening as administrator your android studio .exe
I went through the same problem. I just uninstalled previous build in my emulator and did flutter run again... worked for me.
After this answer:
https://stackoverflow.com/a/68142732/14409491
I uninstalled the antivirus
Then I deleted all folders in the build-tools in C:\Users\user\AppData\Local\Android\Sdk\build-tools
After that, downloaded build-tools again from android studio
I was also facing this issue while using VS Code, then I tried running on Android Studio because sometimes issues are related to emulator.
Though running flutter clean on the terminal from the project
directly seemed to solve my problem. after that also get(pub get) your dependencies to avoid further build errors.

android studio cannot find the file

my android studio says gradle build finished but does not run tasks because and gives the error
C:\Users\The Lepdungs\AndroidStudioProjects\MyApplication2.gradle\buildOutputCleanup\cache.properties (The system cannot find the file specified)
Try going to Build -> Clean Project.
If that doesn't work then try File -> Invalidate Caches/Restart.
The problem is due to caches that android studio has made, so when it creates new files, there's a problem. One of the above steps should solve it.

Android Studio - Gradle build daemon disappeared unexpectedly

This ISSUE persists from last 3 to 4 days. I'm using Android Studio - 2.3.2. But in previous version I had same ISSUE. The whole ERROR is like below.
Error:Failed to complete Gradle execution.
Cause:
Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)
Android Studio also crashes frequently.
When Android Studio crashes it gives ERROR like below.
I'm using Ubuntu 14.04 LTS.
What I have tried.
Installed new, latest and fresh Android Studio.
Made another folder for project work space and checked out latest project code from SVN.
Tried to CLEAN, REBUILD and RESTART Android Studio several times.
I think there should be some problem in Ubuntu but don't know how to solve it. Genuine help will be appreciated.

Finish can only be called once : Android

Recently updated Build: 2.3.1, AI-162.3871768, 20170401,
AI-162.3871768, JRE 1.8.0_112-release-b06x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.11.6 unknown, screens 1440x900; Retina
Switching back to Android 2.2.2 did not help either. Successfully able to build from command Line though(MacOX Terminal)
Delete your $HOME/.gradle directory (or on Windows, %HOME%\.gradle folder). The next execution of gradle will rebuild this. (It will require some downloads, so make sure you have an internet connection).
You can try just deleting $HOME/.gradle/caches, but this will not solve the problem in all cases.
I have similar issue on 2.3.1
I tried using the Android 2.4 Preview 4 but that did not help. I am able to build from command line too.
Android-Studio-2.3.1-Gradle-Sync
It happens when Android Studio creates two instances of gradle. I tried clearing the gradle cache or even deleting the .gradle but did not help. All this problem started when I deleted my old project repo and re-pulled it and imported to my Android Studio.
Best is to delete all your gradle instance from your home directly before your re-import your project Android Studio.
Android Studio started behaving like this after I tried building with the command line(osx) using ./gradlew
What helps is running the studio with sudo:
sudo /Applications/Android\ Studio.app/Contents/MacOS/studio
I wonder if theres a fix to this problem that allows the studio to be started normally as well.

Resources