Unable to run imported project - android

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 !

Related

How to get this project up and running on an Android?

This project at a hackathon was just simply ingenious. And as a curious noob, I want to check it out. They don't have it on PlayStore, nor did they have an APK, but I want to see how it works. So how would I run this on Android?
It's also important to note that this is not a typical Android project. This doesn't work with just importing it to android studio. Trust me, I've tried it like that.
Navigate to terminal/cmd git it by the URL:
git clone https://github.com/getSizeOf/sizeOf-Droid.git
Open Android Studio click on import project, click import project
Click on build.gradle on the project level
Project opened, get coding!!!
Try opening the project with 'project' being the root folder. I just opened it in Android Studio 1.2.2 (latest) and it works fine.
Sometimes, when you open an existing project, you have to expand to show the project structure by clicking on "1. Project" and then select "Project" from the drop-down menu (person preference).
To run on a device, select "Run" from the toolbar then click 'Run app' from the drop down menu.

How to import eclipse android project to Android Studio

I followed the directions in this link Migration from Eclipse to Android Studio
then I able to import the build.gradle to Android Studio. But I cannot run the project, there are also no Android Manifest, Activities, and layouts in the imported project.
My project works fine in Eclipse, and it includes modules.
How to run the imported android project from exported eclipse.
Export from Eclipes:
Update your Eclipse ADT Plugin (you must have version 22.0 or higher).
In Eclipse, select File > Export.
In the window that appears, open Android and select Generate Gradle build files.
Select the project you want to export for Android Studio and click Finish.
Import in Android Studio
In Android Studio, close any projects currently open. You should see the Welcome to Android Studio window.
Click Import Project.
Locate the project you exported from Eclipse, expand it, select the build.gradle file and click OK.
In the following dialog, leave Use gradle wrapper selected and click OK. (You do not need to specify the Gradle home.)
Source

Android Project cloned from github giving error

I have created android project, and added gitignore file from gitignore and pushed to github.
Now I have cloned the same project into different system and imported into eclipse by following the instruction from here
Now I am getting errors saying
Unable to resolve target 'android-19'
WARNING: unable to write jarlist cache file /home/jayesh/Android Developement/TestApp1/bin/jarlist.cache
file permission of jarlist.cache -rwxr-xr-x
Can anyone help me with making the same project running.
I tried
1) eclipse > project > clean
2) right click on project > Android Tools > fix project properties
Android project link https://github.com/JayeshP/TestApp
It seems that you did not install the SDK Platform for kitkat in the SDK Manager. Install it or change the target SDK version.
When importing another project, make sure to enable "Copy projects in to workspace". This helps to solve many errors.
Check buttons on top left pane of Eclipse, theres one named "Android SDK manager". Go in to SDK manager and install selected default ones and Android 4.4.2 Android 19.
right click on you project -> properies -> resource
now, you should do two job:
go to "Android" and choose your suitable target
go to "java build path" and check suitable Android version ("Android4.0 for example")

Android Studios doesn't recognize the SDK manager or adt in setup

I'm having problems setting up AS. I've used it on my home computer that had eclipse, but now I'm trying to install it on my work computer that has never touched anything android. It downloaded properly, I went in through terminal and ran ./android to update the sdk and I created a new Android project.
The project setup doesn't have my actual project files, so I can't local my src file easily (even though it is there somewhere):
AS also isn't recognizing the android sdk and avd setup :
What did I do wrong in my installation? I'm not familiar with this gradle business..
Try this:
Close project
File->Close Project
Now select Configure->Project Defaults->Project Structure
In Project Structure windows Select "SDKs" in left column "Android API" with android icon in middle column.
Correct the Android SDK home path, Build target & Java SDK in left column.
Click Apply & reopen your project.

Linphone Android how to import the library project?

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.

Categories

Resources