On my Mac I installed Eclipse, the SDK and created a new project, then hit build expecting to see my first helloworld app.
I got the error "the project cannot be built until build path errors are fixed".
After going thru all the path-like options in Preferences, I noticed that on the tab "Java Build Path" the "Google APIs [Android 2.2]" option did not have its check box checked.
Checking it made the problem go away.
It works now and I can see the app in the Emulator
Have I not set up my environment correctly? I used all the defaults in Eclipse and the Android SDK.
On the Eclipse menu: Project->Clean, then clean you project.
Check off the Java Build Path for all boxes.
Related
I have just installed Android Studio and when I'm trying to build I get this message:
error running build
target module is undefined
Go Run -> Edit Configurations...
Check Android Application (on the left)
Select your project
In the General tab slect a module (your app)
That worked for me
Today I had the same problem, these steps worked for me:
Close Android Studio
Edit local.properties in project folder, set sdk.dir path to the original android-sdk path which eclipse uses (ie. sdk.dir=c:\Users\Foo\android-sdks)
Load project again, a dialog appears which asks if you really want to use the other path, click yes. if it still does not work, then
Close Android Studio again
Edit local.properties again and set the path back to the original path
Load the project again, the dialog appears again, select yes
My project has been loaded correctly now, maybe it will also work for others, weird problem ;-)
Click Help -> Check For Update
In Android Studio Edit Configuration section look for Android Application. Then in the module select your app name. By default if project is imported this will be DEFAULT. Change this with your app name rebuild the app with gradle build and everything else will be good to go. Hope this helps.
Try to run the gradlew.bat file. This file will try to build your project. When the execution fail will prompt you the version of building tools your sdk miss. Install this version and your project will build.
gradlew.bat calls the environmental variable ANDROID_HOME which has to have as value the path of the android sdk, See from more information,
Android Studio Path (ANDROID-HOME) not able to set?
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.
I am using Windows 7 x64, cygwin, Eclipse Juno cpp, jre6, android ndk r8b, latest cocos2dx for windows. I have tried this tutorial link.
http://www.cnblogs.com/ybgame/archive/2012/06/07/2540693.html
I have overcome the error. But unfortunately, the Eclipse builder don't generate the .apk file. The console's output is here:
Notice that, there is no "make" command called. This is different from the tutorial link above, where the last part of tutorial, the console's output is showing the make command called.
right click on your Eclipse Project -> Android Tools-> Export signed (or unsigned) Application Package
compile the project in msys or cygwin and then import/ create project from source and give a name. click on the run button.you will notice the project run on emulator all is set . good luck.
I'm running Eclipse 3.7.2 on a Win7 machine. I have the Android SDK and AVD. All was working well. I have an Android App project that I've run under the emulator on an AVD and on a real Android device. ADB worked fine as well.
At some point I grabbed SDK Android 4.0.3. Then I had to upgrade a few more things that I cannot remember, perhaps my AVD. But ever since this upgrade there is no option to run my package as an Android Application anymore. If I choose "Run" it throws up a menu asking me to select a way to run it and "Android Application" is not a choice. It has to be Java App, etc. If I open "Run Configurations" there is no "Android Application" in my left column.
My SDK manager still lists Android 4.0 and Android 4.0.3 as "Installed." My AVD Manager still let's me launch an Android virtual device and even create a new one. But Eclipse does not let me run my package as an Android Application.
Make sure you check for updates to the Android ADT plug-in for Eclipse in addition to upgrades for the AVDs, SDKs, and other debug tools. Then make sure you're in your Android perspective (upper left of Eclipse window), rather than some other/generic Java perspective (no Android-specific options).
Also, you can check under Window > Customize Perspective... in Eclipse to double-check that all the Android options (menus, context items, views, toolbars) you want are enabled.
UPDATE:
You can add the Android tools to any perspective (I named mine "Android"). From the DDMS or Java perspective, go to Window > Customize Perspective - DDMS. Click the Command Groups Availability tab, and make sure that "Launch" is checked.
Also go to Project > Properties > Run/Debug Settings and check that there is a Launch Configuration listed. Create/Edit that configuration and confirm that it has an Android tab (usually set to run the Default Activity from your Manifest).
If not, there may be something wrong with your project's association - try right-clicking on your Project in Project Explorer, go to Android tools (if available) > Fix Project Properties. I believe there's an Ant tool that can do this from the command-line, but you'd have to check the Android/Google docs.
There's also the possibility that something's off with your Eclipse installation or that you've got a newer ADT plug-in than your version of Eclipse. Eclipse Juno (v4.2) released at the end of June, and the most recent ADT plug-in may be looking for something that's not there in your v3.7 install.
What fixed it for me was:
Right-clicking on the Project Name in the Package Explorer
Android Tools -> Fix Project Properties
After that I was able to just Click Run As -> Android Application and all was well for me
Click mouse right button on your project -> Configure -> Convert ADT Android Configuration
An easy fix is to manually create an android run configuration:
Run / Run configurations..., then right click on "Android application" and select new, select your project and click Run.
I had a similar problem. What I finally did that worked was go into Project->Properties->Java Build Path->Order and Export and I made sure that the /gen files we're first in the sequence followed by the /src files.
I am using spring and maven plugins in eclipse but when i want to run this project it returns Could not find ShopZilla.apk? How this will resolved, Please suggest me.
Make sure after updating your android sdk sdk build tools are updated properly. You can check it by Open sdk manager -"Android Sdk Build Tools" status must be installed. if the status is not installed then install Android Sdk Build Tools for the same.
If you have got all required plugins installed (ADT, M2E and M2E Android), the apk should be automatically generated by IDE.
Sometimes the apk file is not generated simply because there are some android build error in your project, unfortunately, these are not compile error so they are not shown in Eclipse problems view. For example, if you attach a icon.jpg file in your res/drawable folder and change the extension to png, you get no compile error in problems view, but if you then manually delete the apk file in your project output folder, the apk file will not be generated again and in this situation Eclipse only gives very generic message "could not find *.apk file" in console view, when you trying to run it on emulator.
Now the only question is how can we tell if there are android build error. right click your project, choose Android Tools -> Fix Project Properties. in my jpg/png example, Eclipse will show "libpng error: Not a PNG file, ERROR: Failure processing PNG image C:\android-sandbox\source\yourproj\res\drawable-mdpi\icon.png" and project marked as a error in package explorer view. as soon as you replace icon.jpg with a real png file, bingo, apk automatically generated. Though I am not sure if this can detect all subtile android build error.
If you are using the ADT plugins greater than ADT17 then rename your "lib" folder to "libs".
Then Right click on project => Android tools => Fix project Properties => Clean your project
If still issue then just restart your eclipse. Your issue will be gone.
Please follow these steps; this might help you out:
Go to Project->Properties
Select Android from left-hand side list
Uncheck the "Is Library" checkbox
or
projects -> clean