Android studio installation - android

I tried to install Android studio through terminal. I added the repository:
sudo apt-add-repository ppa:paolorotolo/adroid-studio
Then I typed sudo apt-get install android-studio
and it started downloading. Then while it was downloading I reboot my computer accidentally and when I did the same procedure the system notified me about the interruption and guided to give the command:
sudo dpkg --configure -a
So I did and the installation continued. Now I get the error:
Setting up android-studio (4.2-0ubuntu0) ...
unzip: cannot find or open /opt/android-studio-ide-*, /opt/android-studio-ide-*.zip or /opt/android-studio-ide-*.ZIP.
No zipfiles found.
rm: cannot remove ‘/opt/android-studio-ide-*’: No such file or directory
find: `/opt/android-studio/': No such file or directory
find: `/opt/android-studio/': No such file or directory
dpkg: error processing package android-studio (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
android-studio
E: Sub-process /usr/bin/dpkg returned an error code (1)
HOow can I fix this?

Just because the package manager continues following an interrupt doesn't mean that the package itself will not contain errors.
Try removing the package and starting the process over again.
First purge the package:
sudo apt-get purge android-studio
Then fix any remaining issues (sudo dpkg --configure -a or sudo apt-get update) and run the installation again (sudo apt-get install android-studio).

Related

getting Error: spawn EACCES while ionic build android in ubuntu 14.04

i developed one project in ionic2
while i am doing ionic build android i am getting this error
my ionic info is
Cordova CLI: 6.3.0
Ionic Framework Version: 2.0.0-beta.10
Ionic CLI Version: 2.0.0-beta.36
Ionic App Lib Version: 2.0.0-beta.19
OS: Distributor ID: Ubuntu Description: Ubuntu 14.04.5 LTS
Node Version: v4.4.7
I searched in google but no solution works for me..
How can i fix this Bug?
This is Permission Error While Building App
You Need to Give Permission Gradle
sudo chmod -R 777 /Applications/Android\ Studio\ 3.0\ Preview.app/Contents/gradle
Enjoy :)
hit this command
sudo chmod -R a+rwx /appfolder
It is caused by permission problem. More info on problem here.
If this does not solve your problem then its probably issue of permission in your user profile directory. Try above command on user directory. It will take some time to apply permission.
Regards.
Use the verbose when you make your cordova build:
cordova build -verbose
It will return to you the path that requires the chmod +x
I was using Cordova to run my Hybrid app on my Android device, and I got this error twice during the unsuccessful build ...
Error: spawn EACCES
#Krunel Vaghela's answer above helped me somewhat ...
This is Permission Error While Building App
You Need to Give Permission Gradle
sudo chmod -R 777 /Applications/Android\ Studio\ 3.0\ Preview.app/Contents/gradle
But I kept having this error:
"chmod: -r: no such file or directory"
I was using this command:
[Sandis-Macbook-Pro:Users sandi$ sudo chmod -R 777 /Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle
Note that my Android app is named "Android Studio.app" (with a space in the name). Solution is to simply wrap the path in quotes like so:
[Sandis-Macbook-Pro:Users sandi$ sudo chmod -R 777 "/Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle"
NOTE: In order to find out which folder was having the permissions problem, I had to use this command:
sudo build -verbose
Which yielded the path to the permissions problem folder like this:
ANDROID_HOME=/Users/sandi/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home
Running command: "/Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle" -p /Users/sandi/Desktop/CORDOVA_NOV16/HHUB_NOV17/hhub_CURRENT/platforms/android wrapper -b /Users/sandi/Desktop/CORDOVA_NOV16/HHUB_NOV17/hhub_CURRENT/platforms/android/wrapper.gradle
Error: spawn EACCES
So take the path after "Running command:" - put that, inside quotes, after the ...
chmod -r 777
And that's what saved my day.
Had the same problem, I got it fixed by giving 777 permissions on my Sdk folder :
chmod -R 777 /YOURINSTALLOFANDROID/Sdk
After upgrading to Android 3.2, gradle version has been changed up to 4.6.
So I had to use this following command to modify gradle file permission in my Mac Terminal.
sudo chmod 755 "/Applications/Android Studio.app/Contents/gradle/gradle-4.6/bin/gradle"
Just Remove "node_modules" folder and re-install it using
sudo npm i
Hope It get works ..Thanks..!

Android studio ADB not responding. manually kill "adb" and click 'Restart'

I am running my Android studio on Ubuntu 14.04,its was working fine but suddenly its shows the following error while do build my project.
Error message:
ADB not responding. If you'd like to retry, then please manually kill "adb" and click 'Restart'
I have tried the following in terminal but it also not worked
node#node-Lenovo-G550:~/Android/Sdk/platform-tools$ adb kill-server
The program 'adb' is currently not installed. You can install it by typing:
sudo apt-get install android-tools-adb
but I have adb under platform-tools folder, I do not know why its says "not installed", How I can resolve this?. Please help me.
terminal image
Updated question:
I have added path as following:
export PATH=$PATH:/home/node/Android/Sdk/platform-tools
then executed this: ./adb kill-server
it gives me the following error
bash: ./adb: No such file or directory
if I run as adb kill-server it gives bash: /home/node/Android/Sdk/platform-tools/adb: cannot execute binary file: Exec format error
The directory where add is located, is not in your PATH variable. You could add it to your PATH variable (export PATH=$PATH:~/Android/Sdk/platform-tools I believe). You can also use ./adb kill-server. Note the ./ in front of adb. Because you are executing an executable in your current directory, you need ./
I have done the following steps and its works.
first run following comments to install:
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install android-tools-adb android-tools-fastboot
Second step is move the ADB and Fast boot to our SDK location.
cp /usr/bin/adb <path-to-your-adt-sdk-package>/sdk/platform-tools/adb
cp /usr/bin/fastboot <path-to-your-adt-sdk-package>/sdk/platformtools/fastboot
Last run the command:
SDK location/platform-tools/ adb kill-server.

Android Studio mergeDebugResources issue

I seem to be having difficulties switching to Android Studio. I created a new Project in Android Studio 0.4.3 on Ubuntu 13.10. but I have been plagued with issues. I originally had issues on a windows box when it was first distributed which is why i ignored it until recently. I fixed a few things with gradle but seem to still be having other issues and I ended up following a few suggestions from the links bellow though nothing helped. Does anyone have any suggestions.
mergedebugresources-exception
installing android studio in ubuntu
How to Install Android studio in ubuntu 13.10
I've also installed fastboot and adb in terminal and I have also arbitrarily uninstalled whatever jdk I was using prior had and re-installed java 7 instead of 8 (since it would not install for some reason) via
sudo apt-get purge openjdk*
sudo rm /var/lib/dpkg/info/oracle-java7-installer*
sudo apt-get purge oracle-java7-installer*
sudo rm /var/lib/dpkg/info/oracle-java8-installer*
sudo apt-get purge oracle-java8-installer*
sudo rm /etc/apt/sources.list.d/*java*
sudo apt-get update
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
bellow is the error message i am currently receiving
Execution failed for task ':helloandroid:mergeDebugResources'.
Error: Failed to run command:
/home/kyle/Development/android-studio/sdk/build-tools/19.0.1/aapt s -i /home/kyle/Development/AndroidStudioProjects/HelloAndroid/helloandroid/build/exploded-bundles/ComAndroidSupportAppcompatV71901.aar/res/drawable-hdpi/abc_textfield_search_right_default_holo_light.9.png -o /home/kyle/Development/AndroidStudioProjects/HelloAndroid/helloandroid/build/res/all/debug/drawable-hdpi/abc_textfield_search_right_default_holo_light.9.png
Error Code:
127
Output:
/home/kyle/Development/android-studio/sdk/build-tools/19.0.1/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
Use lib32z1 - worked for me.
sudo apt-get install lib32z1

Cannot run Android AVD run with Eclipse on Linux

I am trying to make my Android AVD run with Eclipse on Ubuntu 12.10. I created the AVD in eclipse, and now it's not running. This is the output error I receive when I run the AVD:
Starting emulator for AVD 'My_android-16'
- Failed to start emulator: Cannot run program "/usrdata/Dev/android-sdk-linux//tools/emulator": error=2, No such
file or directory
I'm using Ubuntu 12.10, latest Eclipse installed.
What I've done:
I gave /tools/emulator chomod 777 permissions.
cp /usrdata/Dev/android-sdk-linux/tools/emulator /usrdata/Dev/android-sdk-linux
You don't have to install all the ia32 package. You can just use:
sudo apt-get install lib32ncurses5 lib32stdc++6
Also, I needed to make a soft link for LibGL.so.1 as mentioned here.
ln -s /usr/lib/libGL.so.1 ~/android-sdk-linux_x86/tools/lib/libGL.so
Run the following command on terminal:
apt-get install ia32-libs
Ref:http://developer.android.com/sdk/installing/index.html#troubleshooting

sdk manager failed to create sdcard in the avd folder AND unable to find userdata.img

I'm at my wits end now. I've been getting either one of these errors trying to set up an android emulator on Eclipse. I'm running Ubuntu.
I've read ALL of the answers that I've found for this error but nothing it working for me. Please help!!!
I have uninstalled and installed the android SDK tools several times, including the system image. I've tried to update ia32-libs although I get the following error:
The following packages have unmet dependencies:
ia32-libs : Depends: ia32-libs-multiarch but it is not installable
E: Unable to correct problems, you have held broken packages
After trying
sudo dpkg -r --force-all librtmp0
sudo apt-get install librtmp0
sudo apt-get install ia32-libs
I still get the same error as above.

Categories

Resources