I know this question exists a lot on StackOverflow but none of the solutions I found seem to work.
The problem
Run without project or with android project
I ofcourse need to select the correct API version but the AVD starts without any problem.
Run with flutter project
I get the error message "unable to locate adb" when starting up the AVD. The device boots anyway and I can run my apps on it but the error is annoying so I would like to get rid of it.
Also when i open the build.gradel file, I get the warning that the sync failed (see image below). When looking in the logs, I see again a lot of: 2020-11-06 14:50:31,561 [4185024] INFO - .deployment.AsyncDevicesGetter - adb not found
What I have tried
check the adb.exe file in appdate (however that could not be the problem since it works with an android project)
use 3 different api versions:28, 29, 30 (in the gradel file I see minSdkVersion 21 and targetSdkVersion 29)
resolve errors in build.gradle: GradleNotFoundException became FileNotFoundException
About Android studio:
Android Studio 4.1
Build #AI-201.8743.12.41.6858069, built on September 23, 2020
Runtime version: 1.8.0_242-release-1644-b01 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
Related
Android Studio's Device File Explorer stopped working properly after upgrading Samsung Galaxy A52 phone.
I've got error on data/data/ folders error executing shell command pm list
Details about Phone and Android Studio:
Galaxy A52 (SM-A525F)
Build Number : A525FXXU4CVJB
Android version : T(Android 13)
Release Date : 2022-11-21
Security patch level : 2022-11-01
One UI 5 Upgrade (Android 13)
link
ANDROID STUDIO
Build #AI-213.7172.25.2113.9123335,
built on September 30, 2022
Android Studio Dolphin | 2021.3.1 Patch 1
Runtime version: 11.0.13+0-b1751.21-8125866 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
I've tried adb shell run-as and I am able to see files with ls
May I get some help how to setup Android Studio to use Device File Explorer properly?
After I've uninstalled Secure Folder Anrdoid Studio works properly as before upgrade with Secure Folder installed.
It's not a solution if you want to keep your Secure Folder but Device File Explorer can be used this way.
With the latest clean installation of Android Studio with all the recommended settings I have this continuous error when I try to start an emulated device. The device starts up correctly and works properly but the "adb.exe has stopped working" popups continue to appear if they are closed, furthermore it is not possible to link the device with Android Studio because it is not recognized. Even if I download a previous image of Android (Android 9.0) I have the same problem.
The only plugins installed are Dart and Flutter.
The question could be repeated but I did not find solutions for this problem, or rather, the solutions found did not allow me to close this problem.
Before this update everything was working properly.
In this case we speak of a clean installation.
When I try to start the "main.dart" application to install it on the device the only error that appears is "Error retrieving device properties for ro.product.cpu.abi:"
Android Studio 3.4.1 Build #AI-183.6156.11.34.5522156, built on May 1, 2019 JRE: 1.8.0_152-release-1343-b01 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Windows 10 10.0
Android Debug Bridge version 1.0.41
Version 29.0.0-5611747
There is a temporary fix for now (if you're using Windows)!
1st Close Android Studio
2nd Open CMD and write: taskkill /f /im adb.exe
3rd Download this file: http://dl-ssl.google.com/android/repository/platform-tools_r28.0.2-windows.zip
4th Go to
C:\Users[your-username]\AppData\Local\Android\Sdk
and replace the "platform-tools" folder with the new one that you just downloaded.
ps: (a) don't forget to keep the backup (b) the AppData is a hidden folder
Since I upgraded to Android Studio Canary 5 I have had issues with Instant Run, it gives me the following error when Instant Run is Enable:
Information:Gradle tasks [:app:assembleDebug]
Error:C:\..etc.\app\build\intermediates\instant-run-support\debug\dependencies\AndroidManifest.xml:2 resource string/app_build_version_name (aka com.itbackyard.iels.client:string/app_build_version_name) not found
Error:java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.AaptException: AAPT2 link failed:
Error:com.android.builder.internal.aapt.AaptException: AAPT2 link failed:
Error:java.lang.RuntimeException: com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: Failed to execute aapt
Error:com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: Failed to execute aapt
Error:com.android.ide.common.process.ProcessException: Failed to execute aapt
Error:java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.AaptException: AAPT2 link failed:
Error:com.android.builder.internal.aapt.AaptException: AAPT2 link failed:
Information:BUILD FAILED in 1m 29s
Information:8 errors
Information:0 warnings
Information:See complete output in console
My only solution was to disable Instant Run from settings. What I was able to find is this topic with out solution so far.
Any idea if this is still a bug or is there any work around till it gets fixed?
Here is my version information:
Android Studio 3.0 Canary 5
Build #AI-171.4141229, built on June 28, 2017
JRE: 1.8.0_152-release-884-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
Edit
I have now updated to
Android Studio 3.0 Canary 6
Build #AI-171.4163606, built on July 7, 2017
JRE: 1.8.0_152-release-884-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
And updated to Canary 7
Android Studio 3.0 Canary 7
Build #AI-171.4182969, built on July 14, 2017
JRE: 1.8.0_152-release-884-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
Still the same problem.
Add this line gradle.properties file. it work for me
android.enableAapt2=false
Android Studio 3.0 Canary 5
If your build fails due to resource processing issue. To temporarily disable AAPT, set android.enableAapt2=false in your gradle.properties file.
I solved this way:
What I did is creating an empty new project in Android Studio 3.0 Canary 7, it does not have this behavior. I compared the new empty project default build.gradle (Module: app) with my existing project that has the mentioned problem.
Off course this can differs from case to case, but in my case, I used a variable to update versionName and it worked previously with out any issues, but not on Andriod Studio 3. Therefore I corrected the line, Sync and Rebuild the problem was gone.
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.
I received an update to android SDK. After the update, when I open a project, Android Studio recommends to update Android Gradle to v 2.3.0 and Gradle to v 3.3. I updated the project as recommended. After that I found an ugly red line under the appcompat-v7:25.2.0' (see pic).
The error, according to android studio, is that I am mixing versions of support libraries (v 25 and 24), but I didn’t find any support library of v24. I tried to build a signed apk, but app build failed (using V2 / full apk signature), so I searched the web and I found one solution to this problem by adding this line to the build.gradle: multiDexEnabled true. Adding that line fixed the problem of generating signed apk, although the red line of error was still there, it didn’t get rid of it.
Then I installed the signed apk on two phones, one running Android 6.0 and the other one is running Android 4.4.2. The app runs smoothly on Android 6.0 and crashes on start on Android 4.4.2 (I set minSdkVersion to 19).
My questions are: how can fix that error in the gradle permanently? Is adding the line “multiDexEnabled” to gradle really needed? How can I run my app on android 4.4.2 without crashing?
I'm had the same issue, just add these lines:
compile "com.android.support:animated-vector-drawable:${supportLibVersion}"
compile "com.android.support:mediarouter-v7:${supportLibVersion}"
In your case supportLibVersion is 25.2.0.