应用关闭自动点按布局

时间:2017-09-28 19:51:33

标签: java android

我建立了一个tic tac toe app它在我的AVD上正常工作但是当我在我的andriod上安装并打开应用程序并点击布局(Gridlayout)我想玩的地方..app自动关闭。 API是我的AVD和我的andriod

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity android:name=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

应用日志

09-29 10:45:10.114 20560-20560/com.example.aquib.tictactoe E/AndroidRuntime: FATAL EXCEPTION: main
 Process: com.example.aquib.tictactoe, PID: 20560
 java.lang.IllegalStateException: Could not find method drop(View) in a parent or ancestor Context for android:onClick attribute defined on view class android.support.v7.widget.AppCompatImageView with id 'imageView8'
     at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.resolveMethod(AppCompatViewInflater.java:327)
     at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:284)
     at android.view.View.performClick(View.java:5207)
     at android.view.View$PerformClick.run(View.java:21177)
     at android.os.Handler.handleCallback(Handler.java:742)
     at android.os.Handler.dispatchMessage(Handler.java:95)
     at android.os.Looper.loop(Looper.java:154)
     at android.app.ActivityThread.main(ActivityThread.java:5527)
     at java.lang.reflect.Method.invoke(Native Method)
     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
09-29 10:45:10.132 20560-20560/com.example.aquib.tictactoe E/MQSEventManagerDelegate: failed to get MQSService.

0 个答案:

没有答案