• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Any Developers here??

I'm new to this field and I've been trying to figure out how to fix the error in my script:
11045463_10206221909843138_4847038369209533239_n.jpg

I'm also following this tutorial
 
Code:
package frankieli.myapplication;

import android.content.Intent;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.content.Intent

public class MainActivity extends ActionBarActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
    public void onButtonClick (View view)
    { if(view.getId()== R .id. Bsignupbutton)
        Intent i = new Intent(MainActivity.this, Display.class);
        startActionMode(i);
    }
    @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_main, 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);
    }
}
 
Upvote 0
A few things. The gradle sync is saying that something is wrong with the manifest so double check where you declare the activity (in this case MainActivity) within the manifest. Make sure it has the right attributes and that it's closed off. I haven't looked at the tutorial but I'm sure you can figure it out. Also in mainActivity make sure your import statement for the Intent Object is closed off with a ';' . Finally I'm not sure startActionmode() is what you want to call here, if you're constructing an intent you probably mean startActivity :) see what you can figure out and if you still have trouble report back.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones