I am building Linphone application for android. I am using windows xp 32 bit.
1) Download android ndk
2) Installed the autotools: autoconf, automake, aclocal, libtoolize pkgconfig
3) run the ./prepare_sources.sh/
I got the output in terminal as
$ ./prepare_sources.sh /cygdrive/d/android/androidNdk/android-ndk-r8d
using /cygdrive/d/android/androidNdk/android-ndk-r8d as android NDK
./prepare_sources.sh: line 23: git: command not found
Applying patch to ffmpeg
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
|--- submodules/externals/ffmpeg/libavcodec/arm/int_neon.S.orig 2011-09-30 19:43:21.935593025 +0200
|+++ submodules/externals/ffmpeg/libavcodec/arm/int_neon.S 2011-09-30 19:44:21.115168033 +0200
File to patch:
Any info, questions or anything really is highly appreciated
Part 1
The following steps can help you create and install the build on your device or emulator(Tested on Mac):
Step1: you need to have the Android SDK and NDK configured and istalled
Also install Autotools Mac users can use this link (Follow point 2.3 only in the link)
Other platform users please make sure you install it correctly.
Step2: Mac users open up your terminal and clone the git repo on any directory you want
to by running the following command: (Other users sorry i don't know how but i think you can figure it out that how you can get the git repo on your directory using command promt or whatever you are using)
$ git clone git://git.linphone.org/linphone-android.git --recursive
After you get the Repo copied into your directory now go to the directory and open the README file and read out the whole file.
Step3: Now we will follow as the instructions written in README file
First Go to root directory of the downloaded project using the following command on Terminal:
Mac users on terminal write cd and
then drag and drop the "linphone-android" folder on terminal
(when you drag and drop the folder terminal will get the path of the folder and then you can hit enter to get into the directory of that folder)
$ cd /Users/myname/Desktop/Android/linphone-android
or just use simple command cd to get into the folder
$ cd Desktop
$ cd Android
$ cd linphone-android
Now when you get into the directory on terminal then check your PATH of SDK & NDK installed on your Mac run
$ echo $PATH
if you see the path with SDK and NDK location then it's ok to proceed with Step4 and skip the below part and if not then you need to setup the PATH before you execute the make and make install script in Step 4:
To set up path use :
$ export PATH=/Users/myname/Documents/adt-bundle-mac-x86_64-20130729/sdk/platform-tools:/Users/myname/Documents/adt-bundle-mac-x86_64-20130729/sdk/tools:/Users/myname/Documents/android-ndk-r9:$PATH
it's like export PATH=(Path of your SDK platform tools folder):(Path of your SDK tools folder):(Path of your NDK folder):$PATH
This will set up the path and to confirm again run
$ echo $PATH
Now you will see that the path of SDK and NDK is there.
Step 4: Now if the Path is already setup you can simply run
$ make
Now connect your Device to you Mac/Pc and see if eclipse has detected it.
After the device is connected run:
$ make install
$ make generate-sdk (optional)
This will install the application into your phone. (you need to have an working SIP username and password to configure in the app)
This above steps worked for me and i was able to get the app running on my device.
Part 2
Importing into Eclipse :
After you have made your build then now you need to import it into eclipse.
Step1: Go to eclipse click on File Menu then Import then select
Existing Android Code into Workspace
Hit Next and Browse to the linphone-android project folder
And Only tick linphone-android folder and Leave Copy project into workspace untick.
Do this Like the below image:
And hit finish.
Now you right click on "linphone-android" (project name) and go to Properties and Java Build Path and then Order and Export and then reorder them as my image below and untick gcm.jar
Hit OK
And Boom No errors
Now just run it on device or emulator. (Make sure your minimum target SDK matches with your device or emulator.)
The above steps worked fine for me and it will work for you as well.
All the Best !!
According to README in root dir of linphone-android you don't need to run prepare_sources.sh, remaining steps for you is to run "make" and "make install":
LINPHONE for ANDROID
**************
To build liblinphone for Android, you must:
0) download the Android sdk with platform-tools and tools updated to latest revision (at least API 16 is needed), then add both 'tools' and 'platform-tools' folders in your path.
1) download the Android ndk (>=r8b) from google and add it to your path.
2) install the autotools: autoconf, automake, aclocal, libtoolize, pkgconfig
2bis) on some 64 bits systems you'll need the ia32-libs package
3) run the Makefile script in the top level directory. This will download iLBC source files and convert some assembly files in VP8 project.
$ make
4) To install the generated apk into a plugged device, run
$ make install
Existing answers shows how to build old linphone but to Build Latest Linphone for Android You can follow these Steps:
1) First Download Android SDK (at least API 16 is needed)
2) Then Download Android NDK(>=r9d) from Google.
3) Then Install cmake, python, yasm nasm Dependencies which is further required while installing Linphone. you can install these tool through Terminal.
4) Then You have to download source code of Linphone using following command:
git clone git://git.linphone.org/linphone-android.git --recursive
5) After Downloading Source code You have to set Path of Android SDK,NDK and also JDK
in Android SDK You have to give path upto Tools.
For Example : in console type following command
export SDK_PATH=/home/rajesh/android/adt_bundle/sdk
export NDK_PATH=/home/rajesh/android/android-ndk-r10c
export JDK_PATH=/usr/lib/jvm/java-7-openjdk-i386/
export PATH=$PATH:$NDK_PATH:$SDK_PATH/platform-tools:$SDK_PATH/tools:$JDK_PATH
6) After setting path you have to navigate through Linphone directory and type command “./prepare.py” then This will configure the build and generate a Makefile in the top level directory.
If you get following error: CMake Error Could not find the intltoolize program then
Refer
http://lists.nongnu.org/archive/html/linphone-users/2015-07/msg00092.html
7) After setting path you have to navigate through Linphone directory and type command “make” then it will generate apk for Linphone.
8) To generate a liblinphone SDK zip containing a full jar and native libraries, run
$ make liblinphone-android-sdk
I hope this helps.
Related
I'm trying to generate an SHA-1 for the android debug build of Flutter app so that I can use Firebase Authentication methods which require that (e.g. phone authentication dynamic links).
I have seen a number of solutions suggesting using the Gradle window in Android Studio, but this is not applicable for a Flutter project.
I understand I can do this from the command line using the java keytool utility.
This solution is available for the Windows command line but I am using *nix (Debian Linux on a Chromebook).
Also, I do not have the full Java JDK installed.
First create a flutter project and open in android studio.
Then select android package.
In android package, select gradlew file. Right click on it and select option "open in terminal"
Then in terminal command line, add the command below
gradlew signingReport
Then It will list SHA1 & SHA256 and you're done.
Run gradlew signingReport from the android directory under the root of your flutter project:
myflutterproject/android$ ./gradlew signingReport
This assumes you have JAVA_HOME and PATH to bin directory set.
If you do not have the full JDK installed, the location of the Java Runtime Environment (JRE) embedded with Android Studio can be found by running:
$ flutter doctor -v
With a default Android Studio installation the location of the JRE should be:
/opt/android-studio/jre/bin/
To set the JAVA_HOME environment variable and PATH to the bin directory, add the following lines to your ~/.bashrc file:
export JAVA_HOME=/opt/android-studio/jre
export PATH=$PATH:$JAVA_HOME/bin
(Close and reopen the terminal window before use)
I think we can build it. But I am getting error to build it on Android Studio. First I download the Android Studio and NDK. Then add the PATH of Android Studio and NDK to the PATH Variable. When I run
./check_tools.sh
I get the output
Could not find automake. Please install it.
Could not find autoconf. Please install it.
Could not find pkg-config. Please install it.
Could not find ant. Please install it.
Could not find yasm. Please install it.
Could not find wget. Please install it.
Could not find libtoolize. Please install libtool.
Invalid version of nasm: your version does not support elf32 output format. If you have installed nasm, please check that your PATH env variable is set correctly.
Failed to detect required tools, aborting.
But i doubt whether i need these tool on Android Studio or not. When I run the project i get the error
java.lang.UnsatisfiedLinkError: Couldn't load linphone-armeabi-v7a: findLibrary returned null.
Can anybody tell me the solution for that.
Yes you can do this
follow the step by step guide at this blog
How to build culinphone on Android Studio using Mac OS X?
http://culinphone.wordpress.com
Here is a step to step guide.
Setup Linphone Sdk on Mac OS X
How to build Linphone in Android Studio on Mac?
Step by step guide :-
Required Knowledge :-
Android Tools
Android Studio
A little bit about mac-terminal(shell)
S/W Requirements:-
Mac OS-X with these tools (You definetely need these tools to build linphone) :-
coreutils, automake, autoconf, libtool, intltool, wget, pkgconfig ,cmake,
gmake, yasm, grep, doxygen, ImageMagick, optipng, antlr3
STEP 1:-
Concerning these useful tools you can install the tools with this command
$sudo port install coreutils automake autoconf libtool intltool wget pkgconfig cmake gmake yasm grep doxygen ImageMagick optipng antlr3
STEP 2:-
Check out these Instructions how to upgrade nasm
STEP 3:-
Then install ant by typing
brew update #update if already installed
brew install ant
If you haven’t installed brew just type command give below
its a medium size download which takes 5 mins to download
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Just follow the process which involves installing various components. If you already have brew installed, make sure it’s up to date by executing:
brew update
Once installed you can simply type:
brew install ant
STEP 4:-
Now its time to install libtool. To install libtool run the command given below
curl -OL http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.gz
tar -xzf libtool-2.4.2.tar.gz
cd libtool-2.4.2
./configure && make && sudo make install
STEP 5:-
if you have not installed these programmes download and install
Download Android Studio & SDK
Download Android NDK
STEP 6:-
Download git repository of LInphone Android by running command
$ sudo git clone git://git.linphone.org/linphone-android.git –recursive
Now everything is configured perfectly
STEP 7:-
Open terminal and cd into linphone-android
Now when you get into the directory on terminal then check your PATH of SDK & NDK installed on your Mac run
$ echo $PATH
if you see the path with SDK and NDK location then it’s ok to proceed skip the below part and if not then you need to setup the PATH before you execute the make and make install script in
To setup path use:-
$export PATH=/Users/<yourusername>/android-sdks/platform-tools/:/Users//android-sdks/tools/:/Users//Documents/ndk/:/nobackup/local/prog/nasm/bin/:$PATH
it’s like export PATH=(Path of your SDK platform tools folder):(Path of your SDK tools folder):(Path of your NDK folder):$PATH
This will set up the path and to confirm again run
$ echo $PATH
Now if the Path is already setup you can simply run
$ make
Now connect your Device to you Mac and see if eclipse has detected it. After the device is connected run:
$ make install
Now if everythink is OK:-
After you have made your build then now you can import it into your Android Studio.
Open Android Studio
Import Project (Eclipse,ADT,Gradle,etc.) > select linphone-android > OK
I am able to build the limphone on mac by follow the steps describe here :-
Linphone for android is not working/missing libraries
You definetely need these tools to build linphone.
Concerning nasm I had the same problem. You can use this site that instructs you how to upgrade to a newer nasm:
Instructions how to upgrade nasm
Concerning other useful tools you can install the tools below with this command:
$sudo port install coreutils automake autoconf libtool intltool wget pkgconfig cmake gmake yasm grep doxygen ImageMagick optipng antlr3
All these are found in the linphone build instructions README.md file.
I am trying to migrate my existing project from cordova 2.1 to the latest, 3.1 which can be installev vía command line,
I already have the Android SDK installed,
So:
sudo npm install -g cordova // All good
cordova create hello com.example.hello HelloWorld // All good
cordova platform add android // Then it fires:
Checking Android requirements...
[Error: The command `android` failed. Make sure you have the latest Android SDK installed, and the `android` command (inside the tools/ folder) added to your path. Output: ]
So I installed Macports and tried:
sudo port install android
Which logs:
Warning: All compilers are either blacklisted or unavailable; defaulting to first fallback option
Warning: Xcode does not appear to be installed; most ports will likely fail to build.
---> Cleaning android
---> Scanning binaries for linking errors: 100.0%
---> No broken files found.
Any idea what am I missing here?
It's work cordova Android for MAC 1000000000%. I fought solution and now i'm working try this #Toni Michel Caubet. I will happy to share my Answer.
STEPS:
Open Your Terminal and followed by,
touch ~/.bash_profile
open ~/.bash_profile
PATH="/Users/System-Name/Documents/android-sdk-macosx/sdk/tools:/Development/android-sdk-macosx/sdk/platform-tools:$PATH" (This is Android SDK Location to stored in My system )
4.Save the file and quit the text editor.
5.Execute your .bash_profile to update your PATH:
source ~/.bash_profile
if you want to see your environment path:
7.In your terminal type: set
After you can see like
8.As far as your made it very correct. After your enter command like cordova platform add android. you get following error. because Java SDK doesn't too set environment PATH.
9.open ~/.bash_profile. Add JAVA_HOME value
10.You can see your environment like STEP 7 set. You should be able see:
11.Successfully created environment now you can create Android project with Cordova or PhoneGap
When you installed the Android SDK, it will come with a bunch of folders, like build-tools, platform-tools, tools, and some others. You need to add platform-tools and tools to your main $PATH environment variable.
See the docs here about how to add things to your PATH for whichever system you are on (Windows or Mac): http://cordova.apache.org/docs/en/3.1.0/guide_platforms_android_index.md.html#Android%20Platform%20Guide
Here is how you would edit the $PATH on Windows:
Click on the Start menu in the lower-left corner of the desktop,
right-click on Computer, then click Properties.
Click Advanced System Settings in the column on the left.
In the resulting dialog box, press Environment Variables.
Select the PATH variable and press Edit.
Append the following to the PATH based on where you installed the
SDK, for example: ;C:\Development\adt-bundle\sdk\platform-tools;C:\Development\adt-bundle\sdk\tools
Save and close both dialogs.
To install the cordova command-line tool, follow these steps:
First of all go through the Cordova Document
For Cordova command-line tools to work, you need to include the SDK's tools and platform-tools directories in your PATH environment. On Mac, you can use a text editor to create or modify the ~/.bash_profile file, adding a line such as the following, depending on where the SDK installs:
export PATH=${PATH}:/Development/adt-bundle/sdk/platform-tools:/Development/adt-bundle/sdk/tools
Next Steps:
Download and install Node.js from Here. Following installation, you should be able to invoke node or npm on your command line.
Install the cordova utility. In Unix(Mac), prefixing the additional sudo command may be necessary to install development utilities in otherwise restricted directories:
For Mac $ sudo npm install -g cordova
once successful installation of cordova is done ,now you can create your application
across all the platforms.
Create the Cordova Application
Go to the directory where you maintain your source code, and run a command such as the following:
$cordova create hello com.example.hello CordovaDemo
hello is the directory where you want to create your application
com.example.hello is the package name
CordovaDemo is the name of the Application
Once Successful creation of your project, some file will be created inside the directory i.e hello
Add Platforms
All subsequent commands need to be run within the project's directory, or any subdirectories within its scope:
$ cd hello
Now you need to specify a set of target platforms, Supported OS for Mac
$ cordova platform add android
plz tell me if you are still having problem.
[Error: The command `android` failed. Make sure you have the latest Android SDK installed, and the `android` command (inside the tools/ folder) added to your path. Output: ]
You just need to install the Latest version of Android i.e 4.3
Go to SDK Manager and install the latest SDK Platform.
And try run the command again.
Hope this will help you.
Here it solved my issue:
into the terminal.
touch ~/.bash_profile (create a bash profile)
open ~/.bash_profile (opening a bash profile)
in your opened file, please type the following, Make sure that you have given the correct path, in case you find it difficult to find your directory in which your Android SDK is installed , search into your terminal with ls -l.
PATH="/Users/System-Name/Documents/android-sdk-macosx/sdk/tools:/Development/android-sdk-macosx/sdk/platform-tools:$PATH"
[Let me clarify first that, this is windows specific suggestion, answer]
For particular cordova version there corresponds particular android API
So,
First check out version of cordova with following command:
$ npm cordova -v
In my case cordova version was 1.4.28 , which corresponds to Android API 19
So the bottom line is don't waste time in downloading all "SDK Platforms"
instead just download corresponding Android API for concerned cordova version...
Hope this help....!!!
I have successfully installed Titanium Studio. SDK Version:1.7.5.Now I have downloaded Android SDK from http://developer.android.com/sdk/index.html
Now i am trying configure Android SDK but when i am Providing Path I am Getting Error like" Could not locate the Android SDK at the given path" I have attached Screenshot as well.
Step 1) Download the android SDK From here.
Step 2) unzip android-sdk ( whichever downloaded )
Step 3) In OS X, there is no /opt directory by default. you explicitly have to create it. Run following command.
sudo mkdir /opt
Step 4) Run following command to enter /opt directory.
cd /opt
Step 5) Run following command to create link of android-sdk. Assume that you have android-sdk located under Applications
sudo ln -s /Applications/android-sdk-macosx/ android-sdk
Step 6) enter to android-sdk/tools directory
cd /opt/android-sdk/tools/
Step 7) or directly enter following command in terminal.
/Applications/android-sdk-macosx/tools/android
Step 8) select necessary packages & download them. Sample screen-shot supplied here.
Open this URL - http://developer.appcelerator.com/question/32161/problem-with-the-android-sdk-installation-in-titanium. They have posted a similar kind of Q-A there.
and if you don't want fall in all this steps then just download eclipse and install ADT plugin for eclipse and download all the packages using ADT plugin.
You can get more info here,
http://developer.android.com/sdk/installing.html
I downloaded android SDK using this way in windows and mac both.
After googling i have come to know the all details of Installation of Android SDK in Titanium.Please refer this image.You can find this image at http://developer.appcelerator.com/get_started
Select the directory which holds your Android SDK with the browse button. Type an ending slash ('/') after the path (Android SDK directory). Now you can select your SDK in the popup next to Default Android SDK.
Locate your Android SDK directory, e.g. /usr/local/android-sdk-macos
Create an empty directory named android-7 within the platforms directory:
mkdir /usr/local/android-sdk-macosx/platforms/android-7
Now try again and select the Android SDK directory within Eclipse.
I just installed Android NDK, r5b, and while trying to follow the steps from Exploring the hello-jni Sample, on the command line I receive the error:
MacBook-2:~ mvermant$ cd ndk/samples/hello-jni
MacBook-2:hello-jni mvermant$ android update project -p . -s
-bash: android: command not found
I'm using Eclipse Helios release 2 with Android SDK r10 and ADT 10.0.0 on MAC 10.6.6. I have also checked to have GNU Make 3.81, and installed GNU Awk(though I am not sure it's in the right place).
I've searched a lot, and seems there might be a class path missing somewhere, but I can't figure out where exactly and what to do to fix it.
You should make sure the tools directory of your android-sdk is on your (shell) path.
Something like:
export PATH="/path/to/sdk/tools:$PATH"
before you execute your command.
In general you will also need two other directories to be on your path:
/path/to/sdk/platform-tools - for adb and other android sdk tools
/path/to/ndk - for ndk-build and ndk-gdb, which are ndk tools
You can also do some setup so that you don't have to run these commands every time you open Terminal.