Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. Android
  4. I would like help wiith an example I cannot get working

I would like help wiith an example I cannot get working

Scheduled Pinned Locked Moved Android
tutorialjavaandroidcomhelp
13 Posts 4 Posters 8 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T turbosupramk3

    The example is here http://www.tutorialspoint.com/android/android_audiomanager.htm[^] In Eclipse I cannot resolve for R. in MainActivity.Java and since I'm brand new to Android, I have no idea how to resolve this. Please help and if I wasn't as descriptive as necessary due to my newbness, ask and I will do my best to answer.

    L Offline
    L Offline
    Lost User
    wrote on last edited by
    #4

    Check that you have the highest level of the support libraries available and that you are using the highest level to compile the project.

    T 1 Reply Last reply
    0
    • RaviBeeR RaviBee

      See the answer on this[^] page.  In Xamarin, R is replaced by the less cryptic identifier Resource. /ravi

      My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

      T Offline
      T Offline
      turbosupramk3
      wrote on last edited by
      #5

      Wow! So with Xamarin, I can write in C#, and it will compile to Android native code? Or even IOS code? And I can write in Visual Studio? If this is correct, sign me up!

      RaviBeeR 1 Reply Last reply
      0
      • L Lost User

        Check that you have the highest level of the support libraries available and that you are using the highest level to compile the project.

        T Offline
        T Offline
        turbosupramk3
        wrote on last edited by
        #6

        This may be a dumb question, but I'm not 100% sure how to do that. My project build target is Android 4.4, api 20. Is that what you mean?

        L 1 Reply Last reply
        0
        • T turbosupramk3

          Wow! So with Xamarin, I can write in C#, and it will compile to Android native code? Or even IOS code? And I can write in Visual Studio? If this is correct, sign me up!

          RaviBeeR Offline
          RaviBeeR Offline
          RaviBee
          wrote on last edited by
          #7

          turbosupramk3 wrote:

          I can write in C#, and it will compile to Android native code? Or even IOS code?

          Yes.  For Android, the output is IL that is JIT compiled by Mono at run time.  For iOS, IL is compiled (by using a Mac) to machine code at build time. /ravi

          My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

          T 1 Reply Last reply
          0
          • RaviBeeR RaviBee

            turbosupramk3 wrote:

            I can write in C#, and it will compile to Android native code? Or even IOS code?

            Yes.  For Android, the output is IL that is JIT compiled by Mono at run time.  For iOS, IL is compiled (by using a Mac) to machine code at build time. /ravi

            My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

            T Offline
            T Offline
            turbosupramk3
            wrote on last edited by
            #8

            Ummm, that is spectacular, I really hope it works as well as I am expecting it to from what you've said and what I read about Xamarin. I'm currently letting the automated installer do its thing and can't wait to try to write c# in VS and then compile to native Android code after a week of pissing in the wind with Android Studio and Eclipse. Does Xamarin allow you to test with the Android virtual machines?

            RaviBeeR 1 Reply Last reply
            0
            • T turbosupramk3

              Ummm, that is spectacular, I really hope it works as well as I am expecting it to from what you've said and what I read about Xamarin. I'm currently letting the automated installer do its thing and can't wait to try to write c# in VS and then compile to native Android code after a week of pissing in the wind with Android Studio and Eclipse. Does Xamarin allow you to test with the Android virtual machines?

              RaviBeeR Offline
              RaviBeeR Offline
              RaviBee
              wrote on last edited by
              #9

              turbosupramk3 wrote:

              Does Xamarin allow you to test with the Android virtual machines?

              Yes.  I recommend using Genymotion.  Other emulators suck. I just finished building a successful mobile app POC for a non-trivial feature of our application.  My colleague and I targeted iOS and Android.  We used Xamarin Forms (that allows shared UI code) for most of our app, as well as custom renderers to build platform specific behaviors for some controls.  I'm very positive about Xamarin and am in the process of buying it for myself for use at home. Note, Visual Studio integration is only offered in the Business version, which retails for $1000.  I plan to use XStudio for my personal purchase - that license costs $300.  Both licenses are perpetual, but support ends after one year, unless renewed.  Xamarin also offers monthly trials.  See https://store.xamarin.com/[^]. /ravi

              My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

              T 1 Reply Last reply
              0
              • RaviBeeR RaviBee

                turbosupramk3 wrote:

                Does Xamarin allow you to test with the Android virtual machines?

                Yes.  I recommend using Genymotion.  Other emulators suck. I just finished building a successful mobile app POC for a non-trivial feature of our application.  My colleague and I targeted iOS and Android.  We used Xamarin Forms (that allows shared UI code) for most of our app, as well as custom renderers to build platform specific behaviors for some controls.  I'm very positive about Xamarin and am in the process of buying it for myself for use at home. Note, Visual Studio integration is only offered in the Business version, which retails for $1000.  I plan to use XStudio for my personal purchase - that license costs $300.  Both licenses are perpetual, but support ends after one year, unless renewed.  Xamarin also offers monthly trials.  See https://store.xamarin.com/[^]. /ravi

                My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

                T Offline
                T Offline
                turbosupramk3
                wrote on last edited by
                #10

                Oh, it's not freeware? Wikipedia implied it was freeware like mono. I can't spend $300 or $1000 to learn to develop, I may never have an app in the app store, so that's quite disappointing. I guess I will cancel the download manager :(

                RaviBeeR 1 Reply Last reply
                0
                • T turbosupramk3

                  This may be a dumb question, but I'm not 100% sure how to do that. My project build target is Android 4.4, api 20. Is that what you mean?

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #11

                  Exactly so. I was previously setting mine to the lower level and that failed, but by sticking with the defaults that eclipse sets it seems to work. Unfortunately, I am still learning as well so I cannot offer a better suggestion. You may like to look at some of the recent offerings in the Android articles section as there are quite a few targetting beginners, so some of the authors may be able to help.

                  1 Reply Last reply
                  0
                  • T turbosupramk3

                    Oh, it's not freeware? Wikipedia implied it was freeware like mono. I can't spend $300 or $1000 to learn to develop, I may never have an app in the app store, so that's quite disappointing. I guess I will cancel the download manager :(

                    RaviBeeR Offline
                    RaviBeeR Offline
                    RaviBee
                    wrote on last edited by
                    #12

                    turbosupramk3 wrote:

                    Oh, it's not freeware?

                    Not until they get acquired by Microsoft (as is rumored).  Then it'll likely become part of Visual Studio. /ravi

                    My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

                    1 Reply Last reply
                    0
                    • T turbosupramk3

                      The example is here http://www.tutorialspoint.com/android/android_audiomanager.htm[^] In Eclipse I cannot resolve for R. in MainActivity.Java and since I'm brand new to Android, I have no idea how to resolve this. Please help and if I wasn't as descriptive as necessary due to my newbness, ask and I will do my best to answer.

                      D Offline
                      D Offline
                      Dominic Burford
                      wrote on last edited by
                      #13

                      R refers to your application Resources. All UI elements are assigned a unique ID which you can then use in your applicaition code to refer to the UI element. All these IDs are part of the Resource class.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups