I'm currently using Eclipse Kepler for JAVA application development.
I want to create an application that can play sound.
Most of solution available on stackoverflow are using javax.sound.sampled* package. But i did not find it in my eclipse.
Is this package INBUILT ? or is there any way to install this package? Do newer versions of eclipse have this package?
Just update your Eclipse.
Steps:
-Go to Help Option in the Menu Bar
-Click on "Check for updates"
-After it is successfully updated, you will get sound package.
It worked for me.
Related
Guys i am following this tutorial
but unfortunately, i am not able to configure it, I have stuck at this section:
"Open a Project in the SDK" .
After importing the project in Eclipse it shows 64 errors, most of them are related to packages like:
Description Resource Path Location Type
The import org.apache.cordova.ConfigXmlParser cannot be resolved WhitelistPlugin.java /MainActivity/src/org/apache/cordova/whitelist line 23 Java Problem
Edit:
Ok, I have followed this link:
http://docs.phonegap.com/en/edge/guide_platforms_android_index.md.html#Android%20Platform%20Guide
and skipped "Open a New Project is SDK".
and directly execute these commands in "cmd":
cordova build
cordova build android
cordova emulate android
It shows in cmd:
INSTALL SUCCESS
Unlocking Screen
Launching Application
LAUNCH SUCCESS
but in simulator there is no application launched.
Please guide me.
Thanks.
First the doc your're following is for an old version, you should have a look at the newest version : http://docs.phonegap.com/en/edge/guide_platforms_android_index.md.html#Android%20Platform%20Guide
Secondly, do you really want to open the project in eclipse? That's really not something needed unless you need to do some native dev in your app.
You probably can ignore the "Open a Project in the SDK" section and just use the CLI to build and run your app.
If you really want to use eclipse, I think you have this errors because you only imported your app but not the cordova libs. When you use the "Android project from existing code" wizard, make sure you select the platforms/android directory and then select all the projects, especially the CordovaLib project.
And last but not least, you probably don't need phonegap and should use cordova instead. I don't know why phonegap is still refering to eclipse. Cordova now recommends using Android studio instead and maybe importing in eclipse doesn't work anymore with latest versions of cordova/phonegap? check cordova docs here : http://cordova.apache.org/docs/en/edge/guide/platforms/android/index.html
Ok,
I found the work around from this link
I installed the "Blue Stak App Player" and after running this command:
cordova run android
It successfully installed and worked in "Blue Stack".
Thanx.
I'm developing a mobile app using phonegap.
When i tried to add third party java libs to android platform by right clicking on project in eclipse , there's no 'java build path' option for adding the java libs .
I believe Eclipse do not recognize phonegap project as a java project , so the option is not visible.
I wonder why most of the online tutorial show such option available in phonegap + eclipse project ? Did i miss something ?
or is there any alternative solution?
Phonegap should have this option, like any other project in Eclipse
If its grayed out then there may be an error within your project.
Can you provide any more detailed errors? Have you tried changing the build path target? Maybe double check to make sure its referring to your JRE as well?
I just realised that those online tutorial doing it in eclipse + android environment and I'm doing it in Eclipse + multi-platform JavaScript environment.
I thought eclipse is smart enough to detect the android code within the phonegap project .
Can we use Android studio for AOSP(Android Open Source Project) development, is there a way to do it. I didnt find one. anybody got any idea on this please ?
You can use Android Studio as a IDE for AOSP, since it's just a modified version of InteliJ's IDE.
from AOSP root:
make idegen && development/tools/idegen/idegen.sh
Then just "Open Project" in Android Studio and select the android.ipr it generated.
To import AOSP source in Android Studio or Eclipse, follow the full instructions here :
https://android.googlesource.com/platform/development/+/master/tools/idegen/README
What Pedlar suggested above is one way of doing it. I ran into lot of Jar dependency issues when I tried it with IDEA community edition (Android Studio is a fork of IDEA IDE). The IDE keeps prompting you about duplicate jars etc. The generated project includes framework Java sources as well as App sources. I tried to build an App project which resulted in broken AOSP build. IMHO, IDEA is a great IDE for Java development. But didn't work well with AOSP.
What worked for me is using eclipse to browse/edit/debug framework sources, but build the code from a terminal window. To avoid AOSP build breaks, please create a shadow dir of AOSP (i.e. lndir of AOSP) and use shadow dir for eclipse project.
This is explained at Using eclipse to browse/edit AOSP link in step by step.
If you are working on AOSP, you might want to check Debugging Android framework services.
I implemented the current version of ActionBarSherlock to my Android Project.
Everything works fine and I don't get any errors.
But when I try to debug or export my project I don't get an .apk-file out of my project. Just a .jar-file with the name of my project.
I've read about some problems the SDK had with building projects that contain external libraries but this was at SDK version 14 and so I hope, this bug is fixed...
So there might be another cause for this problem.
Does anybody know a possible solution?
You cannot get *.jar file as the result of building Android project. This seems very strange to me. There must be something wrong with your project settings (if you changed them), or the project you build is of the wrong type (i.e. it is Java Application instead of Android Application).
You didn't mention which IDE do you use, but I assume you use Eclipse.
Make sure you have installed Android SDK and Eclipse ADT correctly (just in case).
Next thing to try is to create a new Android Application project from existing sources (there should be such option during the process of creation).
I am Java beginner. I have developed only two Java desktop applications and I use Eclipse as IDE. Right now I wanted to work on this project https://nbjfuguesupport.dev.java.net/
All code is in Netbeans. I suceeded to import all libraries that are used in source files in eclipse, and I have no errors showing in code in Eclipse. The problem is that I don't know how to run that code from eclipse. I don't know which class has main method.
Using google I found out that Netbeans uses org.netbeans.core.startup.Main.main to start projects, but I cant't find this in my libraries. Does anyone know in which .jar does this class come with netbeans 5.5 files. ??
Regards.
P.S. I must use Eclipse because I have a team of 3 men who have also only used Eclipse in the past, and we need this code to help us in similar project for college.
You can find the core.jar file that contains Main class under:
C:\Program Files\NetBeans 5.5\platform10\core\
You can simply include that in your Eclipse Java Build path.