I am working on SIP application and using Linphone Library.
I am trying to make and run the build on the device but getting few issues
I have setup the Android SDK and NDK set up on my Mac.
Now when i copy the repo via Terminal using command
$ git clone git://git.linphone.org/linphone-android.git --recursive
And than to Makefile ran this code:
$make
and Then it show's Build Successfull.
Now i need to import this project into Eclipse and when i do this imported project (folder named "linphone-adroid") into my Eclipse it shows me alot's of projects i am confused which one should i use and if i choose all of them then it gives me lot's of errors in other's (Shown in image below)
liblinphone-android --> Ran this on Device runs fine but when i call the numbers it changes it's view and shows duration 0:00 and does not calls the numbers then i have to press hang off button to dismiss the call. (Not able to make call's)
Please suggest me how should i import this project into my eclipse and what else scripts i need to run on the terminal to make it run.
So far what i have did is right or wrong?
Yes , it worked finally.
After build using "make" command.I installed in my device using "make install". Also generated sdk using "make linphone-sdk"
And then simply imported in eclispe just like normal android project.
Without any error it worked. - thank god.
In windows8 cygwin created many issues, so i did build the code using "make" command in MAC. And then simply imported in windows eclipse. (some admin permission issue in MAC)
Note: android-ndk-R9c was failed my build. So then i tried with android-ndk-R9 without additional toolchain it worked great. Android-ndk old versions available at
(http://page2rss.com/0dc3a880ab1762303011d69d18408917).
after building the library you have to import it in eclipse
File -> New -> Other... -> Android -> Android Project from Existing Code -> Browse_your_project
Now open your application (Project which have activity) and assign linphone library which you have earlier loaded....
Right click on your project -> select Android tab from left hand side -> from the bottom library section, click on "Add..." -> you will see the listed library which you have in your eclipse workspace -> select correct one -> click "OK" -> now refresh and clean the project -> build and try to run
check complete guide on linphone android on coders hub.
As suggested by #bhavana
I was doing wrong while importing the linphone-android project into my eclipse.
The correct process is explained below-
Importing into Eclipse :
After i have made the build then now i just need to import the project 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 linohone-android folder and Leave copy project into workspace untick
Like the below image:
And hit finish.
Now i right clicked 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. (Cross check minimum target SDK matches with the device or emulator.)
The above steps worked fine for me.
Related
I need to create an android studio project from this directory on github. I tried VCS -> Checkout from Version Control in Android Studio, but there is no url for this directory in the repo, so I'm not sure hot to clone just this subdirectory.
I also tried downloading the whole repo, doing File -> New -> Import Project in Android Studio, and selecting the messaging subdirectory as the folder to import. This showed a build progress bar, but after it finished, there was no imported project.
How do I do this?
I am not sure if its the correct way, but i resolved it with the following steps on Android Studio 4.1.1 :
Run Android Studio until the Welcome to Android Studio screen shows up.
Select Get from Version Control.
Paste the URL.
Press Clone button.
This will import the complete repository , but you won't be able to run the app yet (exactly as mentioned in your question) .
Now close and re open Android Studio
On welcome screen, select import Project (Gradle, Eclipse ADT, etc.)
Navigate to the folder where the project was downloaded and select the required Sub-folder
Press OK and let the Studio build your project.
I get it now. Go back to this. Then hit Download Zip and unzip it. In Android Studio go to File -> Open -> then to the quickstart-android-master and then down to messaging. Do NOT open quickstart-android-master go down to messaging and open that.
EDIT
Be aware you will have to follow these instructions to get the project to build and run.
Add google-services.json in android studio
How to import facebook sdk 4.8.2 in eclipse. I am unable to import as facebook folder contains aar file when we directly download developer site. And from git , unable to get src files of facebook
Here you have an answer from Android Facebook SDK 4 in Eclipse
I also have faced this problem, so I will write a short guide, how to
install it in Eclipse.
Step 1. Import to Eclipse First of all, download the latest
version of SDK (on current moment it is 4.0). Unzip it to a
folder.
Open Eclipse, click the right mouse button in "PackageExplorer" and
choose "Import". After that, go to "Android" -> "Existing Android
Code Into Workspace".
Now click "Browse" and choose unzipped SDK folder, and deselect all
other found projects, except from the "facebook" (it is an SDK).
Other included projects are just samples, and you don't need them now.
You may select "copy project to workspace" checkbox, if you need this.
Step 2. Fixing errors After importing, we will see, that the
whole facebook SDK package are in errors:
But if we look closer, and open one of marked as error classes, we
will find, that SDK tried to importsupport.v4 library:
It required for properly compilation. You can find instructions how to
download it using Android SDK Managerhere.
After it downloading, you can find it in your Android sdk folder:
<sdk>/extras/android/support/v4. Then add it to the facebook SDK
project: right mouse click on SDK project -> "Properties" -> "Java
Build Path" -> "Libraries" -> "Add External JARs", and choose
android-support-v4.jar from it's folder.
After that a lot of errors will be gone:
But, there are other errors. So we are going to another class, and
found it error code piece. Move mouse pointer on it, and Eclipse will
show you the hint, of what kind of error you are facing. It says that
your compliance Java must be version 1.7. Allow Eclipse do it by
clicking "Change project ...", or do it manually by going to
"Properties" -> "Java Complier" -> "Compiler compilance level"
-> "1.7".
OR
Moving ahead. Now we are facing only one kind of error, that says that
the FB SDK can't find required Bolts Android library.
We are going to google, found it compiled jar in a repository.
Choose the latest version (for current moment it's 1.2.0, but SDK
gradle file is using 1.1.4, so you may choose that), and download the
jar. Now add it to the facebook SDK as external lib, as we do it
before.
Voila! Ther are no errors anymore!
Also don't forget to set in the facebook SDK project "Properties" ->
"Android", that it is a Library.
Just for ensurance, close/re-open the SDK project and clean it
("Eclipse menu" -> "Project" -> "Clean"), so all files can build
properly.
Step 3. Add it to the Android project Now you can try to add
it to your Android app. Go to your Android app project "Properties"
-> "Android" -> "Library" -> "Add", and choose facebook SDK.
Follow official tutorial, and set up your Android application
project (don't forget to add all required elements to Manifest.xml).
Than you can use this tutorial to add LoginButton to your
Activity. Try to build it. It should run without problem.
This also might be helpful, if you find any issue: Facebook SDK v.4 for Android: errors on Eclipse
Check also: Android Facebook SDK configuration on Eclipse
Hope it help
EDIT: As you would see in the comments below, this answer is not already corrected. The best way to deal with this problem is export project from Eclipse to Android Studio, which doesn't have this issue and becoming the first Android Developer tool, where Eclipse seems to be as was said on Android Dev Summit 2015 truly deprecated.
Thank you so much! I'm still procrastinating migrating from Eclipse to Android Studio. And I found that the last version that works with Eclipse would be Facebook Android SDK 4.5.1. Download link here: https://origincache.facebook.com/developers/resources/?id=facebook-android-sdk-4.5.1.zip
Following this instructions make it work!
I have cloned repository from bitbucket.org (it is my repo). But now I can't run this project.
I made next:
Import -> Project from Git
then I follow the importing guide but maybe I selected something wrong. So I can see all files in project tree that I have cloned but can't run it. What's the problem?
When I select Run As in menu I don't see any option (only Run configuration), but I want to see Run as Android project.
I also try add project using Run configuration but I don't see my ea project in Project selection list.
I don't think Eclipse is seeing it as an Android project. When you clone from git, at the last step of the importing wizard, try and selecting Create a new Project and select an android project.
I have eclipse running and am trying to get opencv4android on it (http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/O4A_SDK.html)
Instructions say to go to project -> properties and their will be a C/C++ build to change the location of ndk-build. However, I do not see C/C++ build or general.
When I start eclipse and go to about:
Android Developer Tools
Build: v22.0.1-685705
This product includes Eclipse Platform, JDT, CDT, EMF, GEF and WTP,
all of which are Copyright (c) Eclipse contributors and others.
Visit http://eclipse.org/
Android Developer Tools are Copyright (c) The Android Open Source Project.
Visit http://developer.android.com
I had a similar problem, it looks like the "native support" part was not set up correctly in the project, or at least was not compatible with the eclipse / CDT / android sdk combination I have.
You can maybe try what I did (with eclipse 4.2.2, CDT 8.1.2, opencv4android 2.6.4, android sdk 4.3):
1) close all projects but the Opencv Library one (project explorer, select all projects but the first one, right click, "close project")
2) right click on the first project. Select "Android Tools", then "Add native support ...".
3) select a unique library name without spaces (default names don't work).
4) Go to project properties, the "c/c++ build" section should now be there. Change the build command to ${NDKROOT}/ndk-build, assuming NDKROOT was correctly set up before-hand.
5) right click again on that project. Select "Properties > Android", make sure an Android version is selected in the "Project Build Target" list.
6) build everything and make sure everything works at this point.
Then you can re-open one sample project (eg 15 puzzle), and repeat the operations above if needed.
Hopefully you should be able to build that sample project and launch it on your phone.
It looks like NDK setting become a global setting not a project setting (plug in improvement) and instruction from opencv.org is outdated.
To setup it select: Window/Preferences then Android/NDK and choose "NDK location".
From now following instruction from opencv.org should make it work (If not try steps 1-3 from #dcoz answer, I did it but I'm not sure it if is necessary).
I've had a similar problem on debian testing after an upgrade.
Reinstalling eclipse / cdt did not help.
I've had to rm -r "$HOME/.eclipse" to get it working again.
I have a few projects that were previously tested to be working in 1 PC.
I've since moved to another Windows XP PC, and I've setup the development tools on this XP system. I've downloaded and installed the following in order:
1. Eclipse Classic 3.6.1
2. JDK v6(jdk-6u23-windows-i586.exe)
3. Android SDK Tools rev8(installer_r08-windows.exe)
4. SDK Platform v2.3/2.2, Google APIs, Android API8, rev2, Google USB driver, rev4
5. ADT 8.0.1
I created a new empty project just to make sure things are working, and I seem to be able to get that new project to run on the emulator just fine. However, when I imported an existing project into the workspace, I get a bunch of errors, such as:
"The import java.util cannot be resolved"
"The import android cannot be resolved"
When I look at Project Properties->Java Build Path, it shows "Unable to get system library for the project" under "Libraries" and "Order and Export". What's wrong?
I've also tried copying and pasting the .java files and main.xml files from the imported project to the new project, and it runs correctly...but somehow the imported project doesn't.
Thanks.
Right click on project name, open properties.
Select Java Build Path (from left menus)
Under the "Libraries" tab, find the entry 'Unable to get system library for project', select it then click on the Remove button.
Select Android (from left menus), tick on the version of android you want to target.
Select Project menu (main top level menu), select Clean... Select OK.
Right click on project name again, go down to Android Tools > Fix Project Properties.
That should do the trick and add Android X.X (version you selected) to your project, and the imported project should start working.
Enjoy.
I think your project does not have project target name or missing. And it's simple go to main menu : project->properties->android (from left panel) then mark a project target name as you need for your project. After this it should work if not then clean your project like this : project->clean..>select (clean projects selected below )-> mark your project then click ok. thanks
Click on Run Configurations
Click on icon at top left corner(New launch configuration)
Choose Project
Click run !