2016-04-08 22 views
-2

Verilerin Json nesnesi olarak api'ye gönderileceği bir kayıt formu tasarladım. signup=(Button) findViewById(R.id.login); de bakın,Json verileri api'ye gönderilemiyor

public void signUpp(View v) 

gibi argüman View v vermek sizin public void signUpp() şekli

04-08 11:37:39.542 2608-2608/? E/AndroidRuntime: FATAL EXCEPTION: main 
04-08 11:37:39.542 2608-2608/? E/AndroidRuntime: Process: com.example.android.bet, PID: 2608 
04-08 11:37:39.542 2608-2608/? E/AndroidRuntime: java.lang.IllegalStateException: Could not find method signUpp(View) in a parent or ancestor Context for android:onClick attribute defined on view class android.support.v7.widget.AppCompatButton with id 'sign_up' 
04-08 11:37:39.542 2608-2608/? E/AndroidRuntime:  at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.resolveMethod(AppCompatViewInflater.java:307) 
04-08 11:37:39.542 2608-2608/? E/AndroidRuntime:  at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:266) 
04-08 11:37:39.542 2608-2608/? E/AndroidRuntime:  at android.view.View.performClick(View.java:5198) 
04-08 11:37:39.542 2608-2608/? E/AndroidRuntime:  at android.view.View$PerformClick.run(View.java:21147) 
04-08 11:37:39.542 2608-2608/? E/AndroidRuntime:  at android.os.Handler.handleCallback(Handler.java:739) 
04-08 11:37:39.542 2608-2608/? E/AndroidRuntime:  at android.os.Handler.dispatchMessage(Handler.java:95) 
04-08 11:37:39.542 2608-2608/? E/AndroidRuntime:  at android.os.Looper.loop(Looper.java:148) 
04-08 11:37:39.542 2608-2608/? E/AndroidRuntime:  at android.app.ActivityThread.main(ActivityThread.java:5417) 
04-08 11:37:39.542 2608-2608/? E/AndroidRuntime:  at java.lang.reflect.Method.invoke(Native Method) 
04-08 11:37:39.542 2608-2608/? E/AndroidRuntime:  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
04-08 11:37:39.542 2608-2608/? E/AndroidRuntime:  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
04-08 11:37:39.544 1300-1395/? W/ActivityManager: Force finishing activity com.example.android.bet/.SignUp 
04-08 11:37:39.617 1300-1348/? I/OpenGLRenderer: Initialized EGL, version 1.4 
04-08 11:37:39.628 1300-1348/? W/EGL_emulation: eglSurfaceAttrib not implemented 
04-08 11:37:39.628 1300-1348/? W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x9f0f79c0, error=EGL_SUCCESS 
04-08 11:37:40.059 1300-1314/? W/ActivityManager: Activity pause timeout for ActivityRecord{a684167 u0 com.example.android.bet/.SignUp t4 f} 
04-08 11:37:49.559 1300-1314/? W/ActivityManager: Launch timeout has expired, giving up wake lock! 
+1

'setupVariables()' -> böyle bir toplu kod kodunu önlemek için ButterKnife'a bir göz atmalısınız. –

cevap

2

Ve login olarak, herhangi bir kimlik vardır: Bu hataları alıyorum, onlara

Hata mesajı çözemezse