Page 2 of 2 FirstFirst 12
Results 21 to 27 of 27
  1. #21
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: Problem with andorid sdk

    R is a Java class that contains constants. R is generated automatically by the Android tools. When those constants aren't valid in code that worked before, it's usually because the project was cleaned and rebuilt, but R wasn't generated because something was wrong in an earlier stage of the build. Check your UI XML for errors.
    Get in the habit of using standard Java naming conventions!

  2. #22
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: Problem with andorid sdk

    I see another problem in your screenshots. You're importing android.R, so every place you refer to R is referring to the default R, not the one in your project that contains things like R.layout.activity_main. Removing that import might fix all your problems.

    If you need to refer to android.R, which you should if you want to internationalize your UI by using values like R.string.ok instead of hard-coding "OK", then refer to it as android.R, don't import it.
    Get in the habit of using standard Java naming conventions!

  3. #23
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default Re: Problem with andorid sdk

    I was wrong. My tablet had code to extract the contents of the rar file. I copied the res, src and manifest files to a folder and used AIDE to run the code. It compiled and executed with no errors. It shows "Hello world" in an empty window.
    If you don't understand my response, don't ignore it, ask a question.

  4. #24
    Frenk is offline Member
    Join Date
    Feb 2014
    Posts
    12
    Rep Power
    0

    Default Re: Problem with andorid sdk

    Which IDE do you use?

  5. #25
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default Re: Problem with andorid sdk

    I used AIDE which I downloaded onto my Android tablet from the Google Play Store.
    Last edited by Norm; 02-23-2014 at 04:41 PM.
    If you don't understand my response, don't ignore it, ask a question.

  6. #26
    Frenk is offline Member
    Join Date
    Feb 2014
    Posts
    12
    Rep Power
    0

    Default Re: Problem with andorid sdk

    When i watched tutorials, there recomended to use Eclipse, because there can run applications.

  7. #27
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default Re: Problem with andorid sdk

    I don't know that Eclipse runs on an Android tablet. AIDE runs on my ASUS 10" Android tablet.
    If you don't understand my response, don't ignore it, ask a question.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 0
    Last Post: 11-07-2012, 12:44 PM
  2. Small problem with problem with Java, C++ parse program.
    By dragstang86 in forum New To Java
    Replies: 4
    Last Post: 10-30-2011, 03:43 AM
  3. Replies: 9
    Last Post: 09-21-2010, 04:15 PM
  4. simple line problem / for loop problem
    By helpisontheway in forum New To Java
    Replies: 1
    Last Post: 11-17-2009, 06:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •