When I go to install the packages from with Android Studio I get a "ADB not responding" error with wait/restart/close options.
I can run adb from a term. I can see my device and install the apk from the cmd line, but it doesn't work from within Android Studio.
In the terminal (that is running Android Studio) I get the following
03:56:36 E/adb: Unexpected exception 'Cannot run program "/media/5b317046-147a-42ee-aec1-f73caf1922c5/home/kloud9/WorkSpace/downloads/workspace/android-studio/sdk/platform-tools/adb": error=13, Permission denied' while attempting to get adb version from '/media/5b317046-147a-42ee-aec1-f73caf1922c5/home/kloud9/WorkSpace/downloads/workspace/android-studio/sdk/platform-tools/adb'
I have tried running Android Studio as sudo, but that doesn't help. I have all the environment variables set correctly, I am running oracle sun java jdk1.7.0. Any thoughts on what to try next?
Thanks,
Joe
I had the same issue. This fixed it for me.
sudo apt-get install ia32-libs
Related
I installed android studio, I configured the environment variables and everything, I installed genymotion and created a device, but running the react-native run-android in the project folder occurs the following error:
error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.
please help me in this problem. React-native does not find Genymotion disositivo, in this link has more details: https://pt.stackoverflow.com/questions/382115/react-native-n%C3%A3o-reconhece-genymotion
It tries to connect the emulator to the ADB, by the IP of the device. To check the IP of the device, simply click on an emulator window, the IP address is in the title of the window.
No terminal will run the command:
$ adb connect ip_of_your_emulator:5555
Soon after, run:
$ adb devices
If the name of your file appears in the list, your emulator has been connected successfully!
With the emulator open, simply run the native run-android in the folder of your project.
I've had the same problem earlier this month. As far as I can tell the newer versions of Genymotion don't register on adb devices, a user in the Expo forums speculates it's because they have a paywall now.
I recommend switching to Android Studio, that's what I did to solve my problem.
I ran react-native with the --verbose flag, and got the following error:
...
error Failed to install the app. Make sure you have the Android development
environment set up: https://reactnative.dev/docs/environment-setup.
Error: spawn ./gradlew EACCES
...
So, I gave permissions to the android/gradlew folder as follows:
chmod 755 android/gradlew
But then, I got an error regarding Google Play Licenses:
error Failed to install the app. Please accept all necessary Android SDK
licenses using Android SDK Manager: "$ANDROID_HOME/tools/bin/sdkmanager --licenses".
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
So yeah, pretty the solution was:
Downloading Android Studio with its own SDK
Change the env variabe ANDROID_HOME to the one installed with Android Studio
Installing Google Play Licensing Library (In Android Studio, go to Settings>SDK Manager>SDK Tools, select Google Play License Library and then install)
I have installed android 2.2 in ubuntu 14.04 LTS but when I try to run an android app it shows immediate error:
"Gradle sync failed: Cause: error=13, Permission denied. Consult IDE log for more details (Help | Show Log)".
When I looked into the terminal while I tried to run the android app, it gives below message in terminal:
WARN - roid.tools.ndk.GradleWorkspace - NDK support for project 'MyApp' is disabled because the project doesn't contain any valid native configurations.
I have tried every possible solution on google/stackoverflow but nothing was helpful. Any help/suggestion would be appreciated. Thanks.
This error is sometimes generated due to Java JRE(built-in) failing to execute. Please try the following:
chmod +x android-studio/jre/bin/*
To solve the first problem, did you try to execute the Android Studio as root or using sudo command?
To solve the warn, are you going to use the NDK (Native Development Kit) in your app? If yes, you have installed the NDK? If no, just ignore the warn.
To install the NDK you have to go to
File -> Other Settings -> Default Project Structure
And in the Android NDK Location, click in Download and then continue the installation.
This may happen when your JRE(JDK) files are failing to execute due to no permission. So go to bin folder under your java folder location and make all files executable.
chmod +x /opt/java/java1.8.0_111/bin/*
If you are using built in JRE
chmod +x android-studio/jre/bin/*
I hope this helps.
The permission problem is solved using command 'chmod +x gradlew'. For more explanation refer this link
I have opened it as an administrator and I don't want to install anything unnecessary.
When I tried to open Android Device Monitor through Android Studio: Tools > Android > Android Device Monitor. It always shows the following screen shot:
Screen shot that shows "An error has occurred"
I have found solutions for windows, but I did not find solutions for mac.
One piece from the log:
!ENTRY org.eclipse.osgi 4 0 2015-12-02 22:52:40.714
!MESSAGE Bundle reference:file:org.apache.lucene.core_2.9.1.v201101211721.jar#4 not found.
There are lots of similar lines like this showing "something not found".
So what is missing? How do I install the exact missing parts? Thanks! (There is no enough space for me to install everything from android studio.)
First of all update Android SDK Tools from SDK Manager
Open a terminal window
Navigate to your SDK
Locate the 'tools' folder
cd into it
run: sudo ./monitor
Type in your password
Hope it might solve your problem.
JPCS's solution worked for me; install Java 8 and then the Android Device Monitor will work:
First install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then update and install Java 8
$ brew update
$ brew cask install java
I followed some steps and after long hours struggle all things got sort it out and i got success to run device moniter on Mac OS x.
what i did ?
I installed Homebrew and used its some commands to install java , because its so easy to download and install java in terminal using home-brew. its very good tool to sort out java problems automatically . but here one thing is to keep in mind . which is below ->
when you install java using Homebrew then please make sure you are using same version of java and jre with android studio.in my case my android studio using jre_1.8.0 , so installed java8.
Their some steps to follow.
just paste in terminal to download Homebrew to your system.
1.) /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2.) $ brew tap caskroom/versions
$ brew cask install java8.
this will download and install java 8 automatically to your mac OSx.i installed java 8 for my case,java 9 is also available but i used java8. because i added jre 8 in my android studio compile path.so its required both in same version to aviod conflict.
3.) so once its installed, just restart your android studio and run device moniter from android studio.now you android studio will able to launch device moniter without any conflict.
Thank Happy coding :)
I had the same issue! Since I am not comfortable with using terminal, I just tried updating to the latest Java JDK and it seemed to fix the problem
I am trying to install Android Studio on my ubuntu 14.
Following the official guide While the setup wizard is downloading the components, I get this message:
....
Updated ADB to support the USB devices declared in the SDK add-ons.
Stopping ADB server failed (code -1).
Unable to run 'adb': Cannot locate program "/home/muser/Android/Sdk/platform-tools/adb": error=2, No such file or directory.
Starting ADB server failed (code -1).
....
There are no Android folder under /home/muser
Why is it searching it in that directory?
How to fix it?
After installing Android Studio, just run the following command.
sudo apt-get install android-tools-adb
[EDIT] - I installed Android Studio from here
It's not adb. It is android-tools-adb. Hence you need to use -
sudo apt-get install android-tools-adb
I'm using Ubuntu 11.10 and Eclipse for android developing. I've already made a new project, but it contains error:
Failed to parse the output of 'adb version'
I will be thankful if anyone have an idea how can I fix that?
Install Oracle JRE using PPA:
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
Install ia32-libs from software center.
Two options to solve this problem on windows:
Option 1:
Close the eclipse, if it is running.
Run the command prompt.
Go to the tools location of the android sdk.
run 'adb kill-server'
then run 'adb start-server'.
start the eclipse.
Option 2:
Open the task manager.
kill the adb process.
start the eclipse.
Problem should be solved.
The official Android SDK only runs on i386 JVM, so you need to manually specify the i386 JVM on Eclipse.
First install the Sun(Oracle) 32-bit JVM. Here is a step-by-step on how to do this:
Add the JVM to Eclipse. Navigate:
Window > Preferences > Java > Installed JREs > Add
Put the location of the JVM. Probably will be /usr/lib/jvm/java7/ (my is /usr/lib/jvm/java-7-sun-1.7.0.01). The external libraries will be automatically added when you put the location of the JVM.
Set the Sun (Oracle) 32-bit JVM as default.
if you run eclipse immediately after installing your java JDK, the java virtual machine MIGHT not be properly started. you will receive this error code when launching eclipse.
first check if when you installed your JDK, you copied a script file
/etc/init.d/jexec
if you did, before you do anything fancy, reboot your machine so that jvm starts properly. if you didnt, please decompress your jdk rpm file and extract the contents properly and then reboot.
worked for me, i just had this problem while installing adt bundle (and java jdk) on a virgin install of ubuntu 12.04 on a 64bit machine.
Delete the platform tools and then re-install them from the SDK manager
Copy the sdk\platform-tools contents to sdk\tool
also you must have a JAVA_HOME env var pointing to your java location
ex. JAVA_HOME=C:\Program Files\Java\jdk1.7.0_21