.bash_profile?

Discussion in 'Mac Apps and Mac App Store' started by droid15, Jul 20, 2010.

  1. droid15 macrumors newbie

    Joined:
    Jul 20, 2010
    #1
    was following this tutorial when i came across something unusual.

     
  2. bootedbear macrumors 6502

    bootedbear

    Joined:
    Sep 13, 2004
    Location:
    Austin, TX
    #2
    It's a file that resided in your home folder. It's primary purpose is to define environment variables (like PATH) and aliases for the command line (aka Terminal).

    Because it starts with a ".", it's a hidden file that will not show up in Finder.
     
  3. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #4
    Code:
    open -t .bash_profile
    Or, use a program like TextWrangler that can open hidden files.
     
  4. droid15 thread starter macrumors newbie

    Joined:
    Jul 20, 2010
    #5
    as far as making a line setting goes... is this right? Sorry for all the questions but I have no prior expeirience to this and frankly have no idea what i am doing.


    [​IMG]
     
  5. droid15 thread starter macrumors newbie

    Joined:
    Jul 20, 2010
    #6
    eclipse is giving me this error whenever I try to make a new project. What does this mean?

    [​IMG]
     
  6. mac2x macrumors 65816

    Joined:
    Sep 19, 2009
    #7
    I posted this over in the Mac Programming forum...you might find it informative. BTW, you are trying to use Windows syntax. Highest directory in Unix is / not C:. ;)

     
  7. droid15 thread starter macrumors newbie

    Joined:
    Jul 20, 2010
    #8
    So when it says "add the full path to the tools directory" I can just write this-

    export PATH=$PATH:$HOME/bin:./ and then the rest of my directory.
    One more thing. When I went into terminal and typed "open -t .bash_profile I just got an empty text file named .bash_profile, is it supposed to be empty like that or did I do something wrong.
     
  8. bier-meister macrumors regular

    Joined:
    Nov 25, 2008
    Location:
    Hamburg, Germany
    #9
    Right click on your project in the package explorer and select properties. Then click on Java Build Path. I haven't developed with android but it looks like you are missing a link to the gen folder, you can add that under the Source tab
     
  9. bier-meister macrumors regular

    Joined:
    Nov 25, 2008
    Location:
    Hamburg, Germany
    #10
    From terminal, type cd so that you are in your home folder. The type the command 'ls -al' - this will display a list of all files, including hidden files. If your bash profile is there, type 'less .bash_profile' to see its contents.
     
  10. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #11
    The .bash_profile doesn't exist by default, so it will be empty at first.
     
  11. droid15 thread starter macrumors newbie

    Joined:
    Jul 20, 2010
    #12
    I went into the properties and made sure there was a link(the folder was there) as you can see in the picture.
    [​IMG]

    but I am still getting this error
    [​IMG]
     
  12. droid15 thread starter macrumors newbie

    Joined:
    Jul 20, 2010
    #13
    This is the path to the folder I am supposed to make a path in my .bash_profile
    [​IMG]

    and this is the bash profile itself
    [​IMG]

    I am supposed to be doing this
    Look in your home directory for .bash_profile file. Look for a line that sets the PATH environment variable and add the full path to the tools/ directory to it. If you don’t see a line setting the path, you can add one:
    export PATH=${PATH}:/tools
    You can create the .bash_profile if you haven’t already set one up on your machine.

    but I am still getting an error that looks like this
    [​IMG]

    what am i doing wrong?
     
  13. bier-meister macrumors regular

    Joined:
    Nov 25, 2008
    Location:
    Hamburg, Germany
    #14
    Your path looks wrong. Remove the '.' before /Users
    You don't need the second export

    you can type 'set' in the terminal window and it will show you all the system variables. You will be able to see the $HOME and $PATH variables to see if they are set correctly
     
  14. droid15 thread starter macrumors newbie

    Joined:
    Jul 20, 2010
    #15
    what about it missing the gen source folder? i remade the links.
     
  15. bier-meister macrumors regular

    Joined:
    Nov 25, 2008
    Location:
    Hamburg, Germany
    #16
    From doing a quick bit of research, it looks like the gen folder contains auto generated source files. Have you generated these? You should have a src and gen folder in your package explorer window. There should be some java files under gen. If not, you will need to generate them.
     
  16. droid15 thread starter macrumors newbie

    Joined:
    Jul 20, 2010
    #17
    sorry for all the questions but... how do I do generate the java files, just put random java files there or do i need some specific ones?
     
  17. bier-meister macrumors regular

    Joined:
    Nov 25, 2008
    Location:
    Hamburg, Germany
    #18
    I've not worked with android so I'm probably not the best of help. I take it you are new to it as well? The java generated files are built from the xml files under res, don't know how this is done.

    Have you a good tutorial there to help you set up the android dev environment within eclipse? There should be some good starter guides on the android dev site.

    Under eclipse preferences, you should see an android entry. Make sure it is correctly pointing to your SDK location: /Users/Kaelan/android-sdk-mac_86

    Under your project properties, if you go back to the java build path, make sure that the version of android you are using is there in the Libraries tab.

    Also under the eclipse project menu, turn on build automatically if it is not already turned on and select clean and see if that helps.
     
  18. droid15 thread starter macrumors newbie

    Joined:
    Jul 20, 2010
    #19
    I am now getting this warning. Last thing please interpret this warning for me.
    [2010-07-21 17:46:38 - Emulator] 2010-07-21 17:46:38.766 emulator[321:903] Warning once: This application, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw and move to Quartz.
    [2010-07-21 17:46:54 - HelloDroid] emulator-5554 disconnected! Cancelling 'com.example.helloDroid.HelloDroid activity launch'!
     
  19. bier-meister macrumors regular

    Joined:
    Nov 25, 2008
    Location:
    Hamburg, Germany
    #20
    Cool, sounds like you are making progress.

    Deprecation basically means that those classes are out of date (deprecated) and that there is newer and better alternative to use. I would guess that the example application you are building was built with an older version of the android sdk (1.5 or 1.6) and you are using (2.x).

    NSQuickDrawView would have been the class to use in the older version, but in the new version you should use Quartz. The application might still run, but it's not guaranteed. Deprecated classes are left there for backwards compatibility but they are no longer supported.
     
  20. droid15 thread starter macrumors newbie

    Joined:
    Jul 20, 2010
    #21
    Ya I'm going to try to download an older more stable version of eclipse and see what happens.:)
     
  21. droid15 thread starter macrumors newbie

    Joined:
    Jul 20, 2010
    #22
    I downgraded and it worked right off the bat this time with no errors. now my only problem is the android emulator which is not running correctly.
     
  22. droid15 thread starter macrumors newbie

    Joined:
    Jul 20, 2010
    #23
    Good News I got the android emulator working correctly. Now everything is perfect except for these 2 warnings but they do not seem to affect anything
    [2010-07-22 21:46:16 - HelloAndroid] WARNING: Application does not specify an API level requirement!
    [2010-07-22 21:46:16 - HelloAndroid] Device API version is 7 (Android 2.1-update1)

    and this
    [2010-07-22 21:46:25 - HelloAndroid] ActivityManager: Warning: Activity not started, its current task has been brought to the front
     

Share This Page