Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (getIntent().hasExtra("key")) {
- if(key.compareTo(App_id)==0)
- {
- setContentView(R.layout.home);
- }
- }
- else {
- finish();
- }
- 03-20 13:47:30.270: E/AndroidRuntime(1628): FATAL EXCEPTION: main
- 03-20 13:47:30.270: E/AndroidRuntime(1628): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.test/com.example.meetap.AdHome}: java.lang.NullPointerException
- 03-20 13:47:30.270: E/AndroidRuntime(1628): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1955)
- 03-20 13:47:30.270: E/AndroidRuntime(1628): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1980)
- 03-20 13:47:30.270: E/AndroidRuntime(1628): at android.app.ActivityThread.access$600(ActivityThread.java:122)
- 03-20 13:47:30.270: E/AndroidRuntime(1628): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1146)
- 03-20 13:47:30.270: E/AndroidRuntime(1628): at android.os.Handler.dispatchMessage(Handler.java:99)
- 03-20 13:47:30.270: E/AndroidRuntime(1628): at android.os.Looper.loop(Looper.java:137)
- 03-20 13:47:30.270: E/AndroidRuntime(1628): at android.app.ActivityThread.main(ActivityThread.java:4340)
- 03-20 13:47:30.270: E/AndroidRuntime(1628): at java.lang.reflect.Method.invokeNative(Native Method)
- 03-20 13:47:30.270: E/AndroidRuntime(1628): at java.lang.reflect.Method.invoke(Method.java:511)
- 03-20 13:47:30.270: E/AndroidRuntime(1628): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
- 03-20 13:47:30.270: E/AndroidRuntime(1628): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
- 03-20 13:47:30.270: E/AndroidRuntime(1628): at dalvik.system.NativeStart.main(Native Method)
- 03-20 13:47:30.270: E/AndroidRuntime(1628): Caused by: java.lang.NullPointerException
- 03-20 13:47:30.270: E/AndroidRuntime(1628): at com.example.meetap.AdHome.onCreate(AdHome.java:374)
- 03-20 13:47:30.270: E/AndroidRuntime(1628): at android.app.Activity.performCreate(Activity.java:4465)
- 03-20 13:47:30.270: E/AndroidRuntime(1628): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
- 03-20 13:47:30.270: E/AndroidRuntime(1628): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1919)
- 03-20 13:47:30.270: E/AndroidRuntime(1628): ... 11 more
- Button close=(Button)findViewById(R.id.close);
- close.setOnClickListener(new OnClickListener()
- {
- public void onClick(View v)
- {
- finish();
- }
- });
- Button close=(Button)findViewById(R.id.close);
- close.setOnClickListener(new OnClickListener()
- {
- public void onClick(View v)
- {
- finish();
- }
- });
- View view = infalter.inflate(R.layout.customlayout,null);
- Button close=(Button)view.findViewById(R.id.close);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement