Thread: Android Studio

Results 1 to 3 of 3
  1. #1 Android Studio 
    Community Veteran

    mige5's Avatar
    Join Date
    Aug 2008
    Posts
    5,528
    Thanks given
    573
    Thanks received
    1,410
    Rep Power
    2114
    EDIT: solved.

    Any1 experienced with android studio? Having these 2 small errors, which I have no idea how to fix.. (The entire class is just c+p from a tutorial, so the code should be just fine)

    The whole class:
    Code:
    package com.example.hh.myapplication;
    
    import android.app.Activity;
    import android.os.Bundle;
    import android.view.Menu;
    import android.view.MenuItem;
    import android.view.Window;
    import android.view.WindowManager;
    
    
    public class Game extends Activity {
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
    
            //turn title off
            requestWindowFeature(Window.FEATURE_NO_TITLE);
    
            //set to full screen
            getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
    
            setContentView(new GamePanel(this));
        }
    
    
        @Override
        public boolean onCreateOptionsMenu(Menu menu) {
            // Inflate the menu; this adds items to the action bar if it is present.
            getMenuInflater().inflate(R.menu.menu_game, menu);
            return true;
        }
    
        @Override
        public boolean onOptionsItemSelected(MenuItem item) {
            // Handle action bar item clicks here. The action bar will
            // automatically handle clicks on the Home/Up button, so long
            // as you specify a parent activity in AndroidManifest.xml.
            int id = item.getItemId();
    
            //noinspection SimplifiableIfStatement
            if (id == R.id.action_settings) {
                return true;
            }
    
            return super.onOptionsItemSelected(item);
        }
    }
    Errors:
    Code:
    getMenuInflater().inflate(R.menu.menu_game, menu);
    Cannot resolve symbol 'menu'

    Code:
    if (id == R.id.action_settings) {
    Cannot resolve symbol 'action_settings'
    Number of page #1 releases with most views & posts: (Updated: 2023)
    RS2 server section: 1
    RS2 client section: 2
    Reply With Quote  
     

  2. #2  
    Registered Member
    Optimum's Avatar
    Join Date
    Apr 2012
    Posts
    3,570
    Thanks given
    871
    Thanks received
    1,745
    Rep Power
    5000
    try this



    edit -

    for the R.id.action_settings error, there may be no components called action_settings in your res folder

    Quote Originally Posted by DownGrade View Post
    Don't let these no life creeps get to you, its always the same on here. They'd rather spend hours upon hours in the rune-server spam section then getting laid! ha ha!Its honestly pathetic i haven't seen so many lowlifes in my life its actually insane i wish that this section would just vanish its probably the only way to get these people out of the community...
    PLEASE BE AWARE OF IMPOSTERS MY DISCORD ID: 362240000760348683
    Reply With Quote  
     

  3. #3  
    Community Veteran

    mige5's Avatar
    Join Date
    Aug 2008
    Posts
    5,528
    Thanks given
    573
    Thanks received
    1,410
    Rep Power
    2114
    Solved, dont know what the issue was.. but I just created a new project with a different setup on start, and it had a similar looking class in there already without those issues..
    Number of page #1 releases with most views & posts: (Updated: 2023)
    RS2 server section: 1
    RS2 client section: 2
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Android Studio Emulator
    By Impervious in forum Application Development
    Replies: 6
    Last Post: 02-11-2015, 05:42 PM
  2. Android Studio
    By Orbyt in forum Application Development
    Replies: 13
    Last Post: 08-10-2014, 11:47 PM
  3. Replies: 11
    Last Post: 03-14-2009, 12:31 AM
  4. iExcel Studio Productions
    By iExcel Ltd in forum Showcase
    Replies: 5
    Last Post: 01-21-2008, 01:09 AM
  5. Nabtab studios underway.
    By Beh3moth2 in forum General
    Replies: 6
    Last Post: 05-23-2007, 01:02 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
  •