Dear forum members I am facing this problem when I start my application please someone help
here my android manifest coding
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myfirstapplication.tahirkhan.myapplication">
<application
android:allowBackup="true"
android:icon="@Mipmap/ic_launcher"
android:label="@String/app_name"
android:supportsRtl="true"
android:theme="@Style/AppTheme">
<activity android:name=".MainActivity" />
<activity android:name=".TahirCalculator" />
<activity android:name=".Splash">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
and this code for calculator
package com.myfirstapplication.tahirkhan.myapplication;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
public class TahirCalculator extends AppCompatActivity {
EditText edtfirst, edtsecond;
Button btnadd, btnminus, btnsubtract, btndevid;
TextView tvresult;
@override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tahir_calculator);
edtfirst=(EditText) findViewById(R.id.edtfist);
edtsecond=(EditText) findViewById(R.id.edtsecond);
tvresult=(TextView) findViewById(R.id.tvresult);
btnadd=(Button) findViewById(R.id.btnadd);
btnminus=(Button) findViewById(R.id.btnminus);
btnsubtract=(Button) findViewById(R.id.btnsubtract);
btndevid=(Button) findViewById(R.id.btndevid);
btnadd.setOnClickListener(new View.OnClickListener(){
@override
public void onClick(View v) {
int first, second, result;
first=Integer.valueOf(edtfirst.getText().toString());
second=Integer.valueOf(edtsecond.getText().toString());
result=first+second;
tvresult.setText("Your Result is"+result);
}
});
}
}
Thanks
here my android manifest coding
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myfirstapplication.tahirkhan.myapplication">
<application
android:allowBackup="true"
android:icon="@Mipmap/ic_launcher"
android:label="@String/app_name"
android:supportsRtl="true"
android:theme="@Style/AppTheme">
<activity android:name=".MainActivity" />
<activity android:name=".TahirCalculator" />
<activity android:name=".Splash">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
and this code for calculator
package com.myfirstapplication.tahirkhan.myapplication;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
public class TahirCalculator extends AppCompatActivity {
EditText edtfirst, edtsecond;
Button btnadd, btnminus, btnsubtract, btndevid;
TextView tvresult;
@override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tahir_calculator);
edtfirst=(EditText) findViewById(R.id.edtfist);
edtsecond=(EditText) findViewById(R.id.edtsecond);
tvresult=(TextView) findViewById(R.id.tvresult);
btnadd=(Button) findViewById(R.id.btnadd);
btnminus=(Button) findViewById(R.id.btnminus);
btnsubtract=(Button) findViewById(R.id.btnsubtract);
btndevid=(Button) findViewById(R.id.btndevid);
btnadd.setOnClickListener(new View.OnClickListener(){
@override
public void onClick(View v) {
int first, second, result;
first=Integer.valueOf(edtfirst.getText().toString());
second=Integer.valueOf(edtsecond.getText().toString());
result=first+second;
tvresult.setText("Your Result is"+result);
}
});
}
}
Thanks