[android-beginners] Re: Cannot parse adb version

2010-01-17 Thread csaunders
Alright, so here are some things you should do:
1 - When you run "adb" from your terminal window you get output
2 - When you run "ant -v" from the you get some output telling you
your ant version and an error about build.xml

If these two things are working, then you don't *need* Eclipse to do
your android development.  As was stated earlier, ADT on Windows7
doesn't work well if at all.
You can do android development using whatever you want (vim, emacs,
notepad, etc). If you need an IDE perhaps you should give NetBeans a
try.  There is an android development plugin made for NetBeans that
might work on Windows 7.

Either using NetBeans or some text editor try and get the Hello World
application working on your emulator. The best way to do that would be
to simply use ant to build your project (make sure your emulator is
already running):
yourandroidproject $ ant compile
yourandroidproject $ adb install -r bin/yourandroidproject.apk

In another window you may want to be running logcat so that you can be
sure the application you are trying to install is actually being sent
to your emulator.

I highly suggest you try getting this working from the command line
first.

Cheers,

CS

On Jan 16, 11:21 am, Rc3375  wrote:
> Is there anyone willing to help me beat up ADB?
> I recently did a reinstall of:ECLIPSE/ANDROID & ANT on a windows7
> laptop.  Some say that windows7 isn't compatible.  Which leads me to
> this questionIF is ISN'T, then how are others developing IN
> WINDOWS7  Anyway, all of the files are in their proper locations
> (Eclipse/Android and Ant).  ALL of the PATHS are setup correctly
> within window7 enviornment settings.  With that being said, WHEN
> ECLIPSE is STARTED from WITHIN WINDOWS7, this ERROR comes up that says
> "UNABLE TO PARSE ADB VERSION".  I have tried running ADB KILL-SERVER /
> ADB START-SERVER from the command prompt.  The emulator starts fine,
> but the app in question NEVER STARTS.  Same result if the app is run
> from within ECLIPSE.  All of the most recent AVD's are present and
> installed.  Tried ALL the AVD's...but the app will not appear and run
> the way it should.  Even checked the ADT version, that too is correct.
> SO, if windows7 is not compatible AND other are developing on
> windows7, then it comes down to OVER-LOOKING SOMETHING.
> Does ANYONE HAVE ANY IDEAS OF WHAT THAT COULD BE?  I WOULD
> APPRECIATE THAT IF ANYONE HAS HAD this issue, let me know what the
> problem was, and how you found/solved it.
> Thanks to everyone for the help and assistance.  Rc3375
-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: source not found error!

2010-01-17 Thread csaunders
If you generated a project with Eclipse you should've had to create an
activity when you created the project.

Open up your AndroidManifest.xml file and look at it (either using the
ADT tool or simply the XML itself) and make sure you have something
similar to this:













The Android documentation explains the manifest file quite well I
suggest you check that out too.
http://developer.android.com/intl/fr/guide/topics/manifest/manifest-intro.html

Cheers,

On Jan 15, 6:27 am, umar  wrote:
> and which activity should i add??? please guide i am new to android.
> development..
>
> On Jan 15, 4:17 pm, Manoj  wrote:
>
> > You might have not added your activity in Manifest file, Add it there.
>
> > On Jan 15, 4:11 pm, umar  wrote:
>
> > > can any one provide me solution to this problem??
> > > i using windows vista with ADT on eclipse
>
> > > and getting this error
>
> > > SOURCE NOT FOUND
>
> > > EDIT SOURCE LOOKUP PATH
>
> > > activitythread.performlaunchactivity(activitythread
> > > $activityrecord,intent)
>
> > > how to resolve this??- Hide quoted text -
>
> > - Show quoted text -
-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: Problem running my Projects on Ubuntu 9.10

2010-01-17 Thread csaunders
Install the beta version of Eclipse.  ADT works in it.

On Jan 8, 8:53 am, Dave Feltenberger 
wrote:
> You installed the beta version of what -- Eclipse or Android?  I'm
> having the same issue when I try to run my projects in Ubuntu 9.10 (64
> bit) using Eclipse 3.5.1 and JDK 1.6.0_07.
>
> On Jan 5, 6:11 pm, Christopher Saunders 
> wrote:
>
> > I was having an issue with Eclipse on Ubuntu 9.10 (x86_64) as well.  I
> > grabbed the Beta version which works like a charm.
>
> > On Tue, Jan 5, 2010 at 6:08 PM, Magno Kretzschmar Nardin <
>
> > magno.nar...@gmail.com> wrote:
> > > Ubuntu 9.10? Please, install Eclipse 3.5.1 with Synaptic.
>
> > > Saludos!
>
> > > Magno
>
> > > 2009/12/21 Stefan 
>
> > >> Hi,
>
> > >> I have a problem with Eclipse and Ubuntu. I have created a new empty
> > >> project but when I try to start it I just get a NullPointerException.
> > >> Here's the full stacktrace:
>
> > >> [...]
>
> > >> I had problems to install ADT with the Eclipse that is in the Ubuntu
> > >> repositories, so I have downloaded the precompiled version from
> > >> eclipse.org.
> > >> Is it possible that I have dome something wrong when I have setup the
> > >> ADT environment?
>
> > >> thanks,
> > >> Stefan
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Beginners" group.
>
> > > NEW! Try asking and tagging your question on Stack Overflow at
> > >http://stackoverflow.com/questions/tagged/android
>
> > > To unsubscribe from this group, send email to
> > > android-beginners+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-beginners?hl=en
>
> > --
> > Christopher Saunders
> > Linux and Open Source Enthusiast
> > blog.christophersaunders.ca
-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: View-based vs Canvas-based graphics apps

2010-01-17 Thread csaunders
I was looking for some good demos on how to do some graphics.

These demos give a pretty straightforward way to do graphics by
drawing directly to the canvas:

git://github.com/eburke/android_game_examples.git


On Jan 14, 2:37 pm, Michael boggess  wrote:
> Do you have anymore info on this book?
>
> On Jan 14, 7:11 am, Alessandro Pellizzari  wrote:
>
> > Il giorno mar, 05/01/2010 alle 08.29 -0800, Abolfoooud ha scritto:
>
> > > Now almost all of the examples i found in the SDK for graphics use the
> > > View metaphor, or SurfaceView. I was wondering how can i perform the
> > > second approach, draw to canvas directly.
>
> > I've read "Hello Android". The main app (used throughout all the book to
> > cover various topics) is a Sudoku game that uses the canvas directly.
>
> > Bye.
>
> > --
> > Alessandro Pellizzari
-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: MediaPlayer cannot play music file in res/raw folder

2010-01-04 Thread csaunders
I am doing my development against Android 1.5 in the emulator.  I
don't think it's anything 'special'.

Also, the mp3 files aren't very large, they are about 7K each.

On Jan 4, 4:57 pm, DulcetTone  wrote:
> Are you by any chance trying this on a Hero or Eris?
> The code you cite works fine for me EXCEPT on Hero and Eris (in which
> case, I think it works on SOME of them).
>
> I think the issue might indeed be that (some?) MP3 files fail on (some
> of?) these phones.
> I am myself working toward a "solution" that includes a fallback to a
> WAV file if the first create(idForMp3) returns null.
>
> tone

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] MediaPlayer cannot play music file in res/raw folder

2010-01-04 Thread csaunders
Hello,

I am trying to make an app that simply plays an mp3 file when you
click on a button.  I've based my code off the API Demos from the
android website, and I've been scouring various Android developer
boards but all the solutions are still resulting in the same problem.

When you click on the button this code should be executed:

private void playAudio(Integer media){
MediaPlayer m = MediaPlayer.create(this, R.raw.b);
m.start();
}

When the program gets executed and I click on the button the program
crashes.  All I've been able to determine from the stack trace is
that:
1 - The resource file cannot be found
or
2 - I am not able to open the file descriptor for some reason (it's
compressed?)

Here is the stack trace I am getting from logcat:
E/AndroidRuntime( 1425): Uncaught handler: thread main exiting due to
uncaught
exception
E/AndroidRuntime( 1425): java.lang.RuntimeException: Unable to start
activity ComponentInfo{org.me.demogo/org.me.demogo.DemoGoPlayer}:
android.content.res.Resources$NotFoundException: File res/raw/a.mp3
from drawable resource ID
#0x7f04
E/AndroidRuntime( 1425):at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2268)
E/AndroidRuntime( 1425):at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2284)
E/AndroidRuntime( 1425):at android.app.ActivityThread.access
$1800(ActivityThread.java:
112)
E/AndroidRuntime( 1425):at android.app.ActivityThread
$H.handleMessage(ActivityThread.java:
1692)
E/AndroidRuntime( 1425):at android.os.Handler.dispatchMessage
(Handler.java:
99)
E/AndroidRuntime( 1425):at android.os.Looper.loop(Looper.java:
123)
E/AndroidRuntime( 1425):at android.app.ActivityThread.main
(ActivityThread.java:
3948)
E/AndroidRuntime( 1425):at
java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime( 1425):at java.lang.reflect.Method.invoke
(Method.java:
521)
E/AndroidRuntime( 1425):at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:
782)
E/AndroidRuntime( 1425):at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
540)
E/AndroidRuntime( 1425):at dalvik.system.NativeStart.main
(Native
Method)
E/AndroidRuntime( 1425): Caused by: android.content.res.Resources
$NotFoundException: File res/raw/a.mp3 from drawable resource ID
#0x7f04
E/AndroidRuntime( 1425):at
android.content.res.Resources.openRawResourceFd(Resources.java:
814)
E/AndroidRuntime( 1425):at android.media.MediaPlayer.create
(MediaPlayer.java:
550)
E/AndroidRuntime( 1425):at org.me.demogo.DemoGoPlayer.playAudio
(DemoGoPlayer.java:
29)
E/AndroidRuntime( 1425):at org.me.demogo.DemoGoPlayer.onCreate
(DemoGoPlayer.java:
25)
E/AndroidRuntime( 1425):at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1123)
E/AndroidRuntime( 1425):at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2231)
E/AndroidRuntime( 1425):... 11
more
E/AndroidRuntime( 1425): Caused by: java.io.FileNotFoundException:
This file can not be opened as a file descriptor; it is probably
compressed
E/AndroidRuntime( 1425):at
android.content.res.AssetManager.openNonAssetFdNative(Native
Method)
E/AndroidRuntime( 1425):at
android.content.res.AssetManager.openNonAssetFd(AssetManager.java:
412)
E/AndroidRuntime( 1425):at
android.content.res.Resources.openRawResourceFd(Resources.java:
811)
E/AndroidRuntime( 1425):... 16 more

Thank you,
CS

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en