android-studio : Error while executing studio.sh - android

After attending Google IO 2016 extended, I downloaded studio from https://dl.google.com/dl/android/studio/ide-zips/2.2.0.0/android-studio-ide-145.2878421-linux.zip
I extracted it. But after that, I am not able to execute studio.sh..
It shows following error:
To-be-filled-by-O-E-M:~/Applications/android-studio/bin$ ./studio.sh
./studio.sh: 137: ./studio.sh: declare: not found
./studio.sh: 141: ./studio.sh: Syntax error: "(" unexpected (expecting "fi")
Am I missing something ?
Note: I have posted the issue on Google Plus Community Android Studio. Hers's the Link to my post

If you are ubuntu user then you can edit studio.sh and change fist line from
#!/bin/sh
to
#!/bin/bash
It works for me in Ubuntu 14.04.
Original Issue

Just use the previous studio.sh file and it works like a charm!

Edit the file ~/android-studio/bin/studio.sh:
change line 1
#!/bin/sh
to
#!/bin/bash

This issue is fixed in Android Studio 2.2 preview 2 (download from this page).
Fixed bug preventing the IDE from starting on some Linux distributions (in particular where /bin/sh is not bash)
From the changelog.

I also got the same error and i have replaced the latest /bin/studio.sh file with my previous /bin/studio.sh file and it works like charm.

Related

Installing compile samples 4.0 failed nvidia

While installing NVidia Android CodeWorks I have received an error at the very end of the installation process saying :
installing compile samples 4.0 failed nvidia
Return Code: 2Compile Samples failed. Please check the /home/user/NVPACK//_installer/compile.log. You can send it to TegraDeveloperPack-Users#nvidia.com if you can not resolve it.
Does anyone know how to solve this problem please
So that other people having the same problem might go on something for I have not found an optimal solution to this problem.
I have managed to solve it by simply copying my version of jdk (which is jdk1.8.0_101) to the specified Nvidia Codeworks folder and renaming to the one missing in the log (...\Nvidia\Codeworks_installer\compile.log - \Nvidia\Codeworks\jdk1.8.0_77" does not exist.) In my case it compiled successfully, however it must be noted that this is not a good solution. Messing around with the environment valuables might be a reasonable place to start otherwise.
If your log file shows:
Error: JAVA_HOME is not defined correctly.
make: *** [antbuild_Basic_debug] Error 1
We cannot execute /usr/bin/java
Makefile.Basic.mk:92: recipe for target 'antbuild_Basic_debug' failed
you can fix it by creating a soft link like this:
sudo ln -s $JAVA_HOME/bin/java /usr/bin/java

Deploy Apps with Ionic Package

I figured i would try the 'new' CLI tool for Ionic, Package, but i am getting some weird errors that i haven't seen before.
When running the command :
ionic package build android --profile release
The error i am getting
undefined:0
^
SyntaxError: Unexpected end of input
at Object.parse (native)
at /usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/io-config.js:179:28
at fs.js:271:14
at Object.oncomplete (fs.js:107:15)
After some research i found that this can happen when a command is run without sudo, but when running the command with sudo i am getting the dam error message.
Hopefully i am lucky and ill find an Ionic enthusiast who might help me with the matter. Couldn't find any Ionic related topics where this error was mentioned.
Any help appreciated!
I had to add [] to the .io-config.json file in the root directory of my ionic app.
Btw. dont forget to install ionic add ionic-platform-web-client
The solution for me was annoyingly simple. In the file mentioned, find the line where CONFIG_BACKUP is defined and change it. You should see that it is:
var CONFIG_BACKUP = './.io-config.json'
It should actually be:
var CONFIG_BACKUP = './io-config.json'
I was building for iOS but had the same error as you which disappeared after the above.
For me the error resulted from the config.xml file. I would open all ionic files to make sure there are no formatting errors. The rebuild

Parsing Error, When load Android SDK

After creating an Android application project I have found these two errors in console:
Error: Error parsing E:\Android\ANDadt\adt\sdk\system-images\android-22\android-wear\armeabi-v7a\devices.xml
Error: Error parsing E:\Android\ANDadt\adt\sdk\system-images\android-22\android-wear\x86\devices.xml
It might be a permission issue. Make sure you have writing permissions for that folder. Try starting Eclipse or the SDK Manager as Administrator.
in windows:
copy devices.xml file from
sdk\tools\lib\devices.xml
and paste(override it) to
sdk\system-images\android-22\android-wear\armeabi-v7a\devices.xml
This solution worked for me(try it).
For OS X user this is the only thing work for me:
sudo ./eclipse
Copy file devices.xml file(\sdk\tools\lib), and paste it to the location folder where the error occurred. This solution worked for me in Windows 10.

./create-android-project.sh: line 103: /home/adt-bundle-linux-x86_64-20131030_Full_ADT_Working_tool/sdk/tools/android: No such file or directory

I am trying to build project of cocos2dx in my eclipse.whenever I am try to run ./create-android-project.sh command on my terminal its gives me an error saying :-
Now cocos2d-x supports Android 2.2 or upper version
./create-android-project.sh: line 103: /home/adt-bundle-linux-x86_64-20131030_Full_ADT_Working_tool/sdk/tools/android: No such file or directory
input target id:
I have made every change as per suggested in this tutorial :- http://www.raywenderlich.com/33750/cocos2d-x-tutorial-for-ios-and-android-getting-started
I have changed the following lines :-
# set environment paramters
NDK_ROOT_LOCAL="/home/laschweinski/android/android-ndk-r8d"
ANDROID_SDK_ROOT_LOCAL="/home/laschweinski/android/android-sdk-linux_86"
to
NDK_ROOT_LOCAL="/home/adt-bundle-linux-x86_64-20131030_Full_ADT_Working_tool/android-ndk-r10d"
ANDROID_SDK_ROOT_LOCAL="/home/adt-bundle-linux-x86_64-20131030_Full_ADT_Working_tool/sdk"
in create-android-project.sh shell script.
have also provided path of my NDK in build_native.sh.
Can anyone tell me that where I am lacking in building this project. Any help will be appreciated. I am working on Ubuntu.
Thanks.

What is LT_INIT(...) in Linux?

I'm customizing linphone (open source voip dialer).
When I build linphone-android from source, some errors occurr.
Problematic path is "submodules/libilbc-rfc3951/Makefile".
Error is like this:
./configure: line 2521: syntax error near unexpected token `disable-static'
./configure: line 2521: `LT_INIT(disable-static)'
What is 'LT_INIT(disable-static)'?
And... What should I do about this?
It looks very complicated to me.
As Aduait had mentioned, http://www.gnu.org/software/libtool/manual/html_node/LT_005fINIT.html will explain what is LT_INIT(...).
Regarding the LinPhone-Android build issue, You got to remove submodules/libilbc-rfc3951/ and try to run make or prepare_source.sh respectively. It will fetch the right code for compilation.
I personally faced the same issue and the above method fixed my problem.
I was able to defeat this one by going to submodules/libilbc-rfc3951/ and running these commands:
aclocal
autoconf
automake --add-missing

Categories

Resources