I've got an Android project with the target to Android 9 (PI) -> SDK Platform 28.
I would like to write Xamarin UI tests to my project, but unfortunatelly I get the error:
System.Exception: 'The running adb server is incompatible with the Android SDK version in use by UITest:
C:\Users\User\AppData\Local\Android\Sdk
You probably have multiple installations of the Android SDK and should update them or ensure that your IDE, simulator and shell all use the same instance. The ANDROID_HOME environment variable can effect this.'
I use following versions:
Target Platform: Android 9
Xamarin.UITest 3.0.0 (currently the latest)
ADB 1.0.41
Before I used the ADB 1.0.39, but I replaced it by the version 1.0.41 after the error occurred.
Does Xamarin UI Test currently works with the target platform Android 9 at all?
What are compatible versions?
I found the solution :)
It was really a problem with different ADB versions...
The concrete problem was, that the ADB version within Visual Studio was different from my version in C:\Users\User\AppData\Local\Android\Sdk.
Following solution helped:
Open the "Package Manager Console" within Visual Studio.
Update ADB to the latest version (within the console): dotnet tool update --global AndroidSDK.PlatformTools.ADB
Download the same version as updated from the ADB git-hub project
Rename the old "platforms-tools" folder within C:\Users\User\AppData\Local\Android\Sdk\ and copy the downloaded "platforms-tools" folder into the Sdk directory.
Restart the computer.
The tests started after these steps successfully.
PS: The "platforms-tools" folder can be found using the "adb version" command within the windows console.
Related
I installed Android Studio Arctic Fox 2020.3.1 on Ubuntu via the Ubuntu Software Center having previously installed the Java and android SDK's using apt from a terminal, following the official installation instructions and I had no reported issues while installing or after. When I ran Android Studio, its seems to have detected the Android SDK location which is installed at:
/usr/lib/android-sdk
but when I tried to add additional platform and tools for android nougat in:
Tools->Android SDK->Android SDK Location
The Android SDK location is:
/usr/lib/android-sdk
Which is correct, but when I click Edit and the SDK Components Setup dialog is loaded, the Android SDK location is again displayed and is also correct, however there's a warning message underneath which states:
<!> An existing Android SDK was detected. The setup wizard will only download missing or outdated SDK components.
When that appears to be merely stating the obvious and doesn't need to be said, so why the warning?. I just ignored it anyway and tried to add some additional plaform support. Prior to that, to test android studio was working after install, I rebuilt an existing hello-world project and the target platform from previous builds was 27.0.1 and as a result of rebuiding that existing project Android Studio appears to have created a hard link from 27.0.1 which it installed to the 'debian' folder, so when I list that location in a terminal I get:
$ls -al /usr/lib/android-sdk/build-tools/
lrwxrwxrwx 1 root root 6 Aug 29 2019 27.0.1 -> debian
drwxr-xr-x 3 root root 4096 Aug 11 00:22 debian
As you can see '27.0.1' is a hard link to the debian folder and by checking the properties of the link I can confirm it was created by Android Studio on 11th August which is the date it was installed:
27.0.1 Properties
Name: 27.0.1
Type: Link to folder (inode/ directory)
Parent folder: /usr/lib/android-sdk/build-tools
Modified Wed 11 Aug 2021 12:22:55 BST
When I attempt to install any additional platforms and tools, Android Studio now complains and cannot continue, it tells me to check the log and when I examined the Idea.log it says:
'build-tools;debian' in inconsistent location '/usr/lib/android-sdk/build-tools/27.0.1' (Expected '/usr/lib/android-sdk/build-tools/debian')
when the expected location exists and there appears to be no such issue, since the Android SDK is exactly where the installer put it and exactly where it should be, I dont know why it thinks there is a problem, where there doesn't appear to be one. However I dont know why Android Studio created the hard link for platform 27.0.1 -> debian when it added that platform to build hello world?
I worked out the solution myself. The solution is:
(Note: you need to ensure your PC is connected to the internet, so Android Studio can download the Android SDK)
Uninstall the Android SDK.
In my case, I installed the Android SDK via apt in a terminal, so I uninstalled using the following commands:
sudo apt-get remove android-sdk
and then
sudo apt-get --purge remove android-sdk
Launch Android Studio and it will automatically start the Android Studio Setup Wizard and issue the pop-message:
Title: Missing Components
Message: No Android SDK found
Follow the wizard to install the SDK.
This time the SDK is installed to your home directory and Android Studio has no issues with the SDK.
To test it all works, I installed the additional build-tools and target platforms for my test app and built and ran it on an AVD and everything works fine.
After updating Android Studio to 2.0 l am getting this error unable to obtain debug bridge and Android Device Monitor does not open. Anyone faced this error before?
I just open sdk manager and installed all android sdk tools and done.
Check whether you need to install "Android Sdk Platform Tools" in the Android SDK Manager.
Somehow, after installing Android Studio from the bundle (for Linux) I lacked the "platform-tools" directory in "Android/Sdk", where the adb executable resides. Installing the platform tools helped. It was easier to find in the standalone sdk manager.
This is because you deleted the adb.exe (it might be your antivirus who deleted it),that resided in the platform tools in the android sdk folder.
What you need to do is to delete the current platform-tools in the sdk manager program and re install it all over again.
I installed the right sdk version that matched my virtual device android version
I am also running the same problem when update android studio from 1.4 to 1.5 stable version. When I run adb command from terminal then i found following error :
bash: ./adb: cannot execute binary file: Exec format error
After R&d I found that this error occurs due to unsupported architecture. In my case:
I am using ubuntu14.04 LTS 32-bit. I observed that after updation, lib folder under platform-tools converted to lib64. I think above error occurs due to 32-bit architecture because after updation 32-bit support removed.
For permanent solution upgrade you system to 64-bit architecture.
Quick solution is to replace the updated platform-tools folder with old one that containing the lib folder instead of lib64.
I think 32-bit architecture support for android development stopped by google for future releases. But I am not sure.
I am phase these error when updating Android-SDK Plateform-Tools 23.1 in Android SDK Manager
i am worked on ubuntu 14.04 [32bit] that is not supporting with Plateform-Tools 23.1 it is only supporting in 64bit Operating System architecture that's why downgrade my Plateform-tools 23.0
it works perfect...!!!
Go to: Android Studio Settings > Appearance & Behavior > System Settings > Android SDK:
If path for SDK are text in red, change to your SDK folder and click ***APPLY***
Open the standalone SDK manager and install the platform tools package.
Android studio was communicating with adb normally. Right after updating platform-tools to version 23, android studio stopped communicating with adb.
It displays the message:
Unable to create Debug Bridge: Unable to start adb server: Unable to
detect adb version, adb output:
/data/programs/android-sdk/platform-tools/adb: /lib64/libc.so.6:
version 'GLIBC_2.14' not found (required by
/data/programs/android-sdk/platform-tools/adb)
/data/programs/android-sdk/platform-tools/adb: /lib64/libc.so.6:
version 'GLIBC_2.15' not found (required by
/data/programs/android-sdk/platform-tools/adb)
I have Centos 6.5 (final) Kernel
Linux 2.6.32.431.el6.x86_64
Gnome 2.28.2
I think the only solution to this problem is to upgrade the distribution because one can't simply upgrade GLIBC on the dist
A temporary workaround is to rollback to a previous version of the platform tools.
The version introduced this is platform-tools_r23.1.0.
The last working version is platform-tools_r23.0.1.
You can download the last working version from
http://dl-ssl.google.com/android/repository/platform-tools_r23.0.1-linux.zip
Just extract it and replace the platform-tools folder inside your sdk folder.
I found a temporary solution:
I have a copy of the previous version of platform-tools folder. I replaced the new folder with the older one. back to normal.
But I still wish someone finds a solution to make platform-tools v23 works on Centos machine.
After updating Android Studio to 2.0 l am getting this error unable to obtain debug bridge and Android Device Monitor does not open. Anyone faced this error before?
I just open sdk manager and installed all android sdk tools and done.
Check whether you need to install "Android Sdk Platform Tools" in the Android SDK Manager.
Somehow, after installing Android Studio from the bundle (for Linux) I lacked the "platform-tools" directory in "Android/Sdk", where the adb executable resides. Installing the platform tools helped. It was easier to find in the standalone sdk manager.
This is because you deleted the adb.exe (it might be your antivirus who deleted it),that resided in the platform tools in the android sdk folder.
What you need to do is to delete the current platform-tools in the sdk manager program and re install it all over again.
I installed the right sdk version that matched my virtual device android version
I am also running the same problem when update android studio from 1.4 to 1.5 stable version. When I run adb command from terminal then i found following error :
bash: ./adb: cannot execute binary file: Exec format error
After R&d I found that this error occurs due to unsupported architecture. In my case:
I am using ubuntu14.04 LTS 32-bit. I observed that after updation, lib folder under platform-tools converted to lib64. I think above error occurs due to 32-bit architecture because after updation 32-bit support removed.
For permanent solution upgrade you system to 64-bit architecture.
Quick solution is to replace the updated platform-tools folder with old one that containing the lib folder instead of lib64.
I think 32-bit architecture support for android development stopped by google for future releases. But I am not sure.
I am phase these error when updating Android-SDK Plateform-Tools 23.1 in Android SDK Manager
i am worked on ubuntu 14.04 [32bit] that is not supporting with Plateform-Tools 23.1 it is only supporting in 64bit Operating System architecture that's why downgrade my Plateform-tools 23.0
it works perfect...!!!
Go to: Android Studio Settings > Appearance & Behavior > System Settings > Android SDK:
If path for SDK are text in red, change to your SDK folder and click ***APPLY***
Open the standalone SDK manager and install the platform tools package.
Error: adb server is out of date. killing...
cannot bind 'tcp:5037'
ADB server didn't ACK
Android Studion 0.8.9 (beta) was working fine with Maverick using Genymotion for emulator. Don't quote me on this but the problem started a few days after i upgraded to Yosemite.
For various compatibility reasons to maintain a delicate balance with gradle and the latest google libraries, I have updated my Android Studio to version 0.9.2, as of writing, this is in the Canary branch.
Gradle is 0.14.+
Gradle Wrapper also must be the latest version if you use Gradle 0.14.+
OSX is Yosemite 10.10
My Android Build tools are up to 21.1.1
I have Android 5.0 API level 21 installed
ADB version is 1.0.32
and Genymotion is updated 2.3.1
Genymotion is set to use my custom android sdk tools instead of it's own built in ones, Settings > ADB > Use custom Android SDK tools
let me know if you still have issues, everything was broken for me for a little while too. Make sure ADB is still on your path and that it is the correct version ("adb version" on the command line, without quotes), in some cases newer versions of Android Studio make you move the android sdk folder location.
Try killing your adb service (it's probably still running). Then restart Android Studio.