android classcastexception at android.app.Application

前端 未结 1 1887
无人共我
无人共我 2021-01-24 09:30

i have the following exception when i running the following application

Activity:

package com.google.android.SmartStudentmCompanion;


import java.io.Buf         


        
相关标签:
1条回答
  • 2021-01-24 09:49

    In your manifest change

    <application android:icon="@drawable/icon" android:label="@string/app_name">
    

    to

    <application android:icon="@drawable/icon" android:label="@string/app_name"
        android:name=".ApplicationEx">
    

    Since you have not stated the android:name for the <applicaton> the OS looks for the default Application class. In order to point it to your Application subclass you should use android:name attribute.

    0 讨论(0)
提交回复
热议问题