简体   繁体   English

从未使用“ MyApplication”类

[英]Class 'MyApplication' is never used

After I successfully integrated flurry SDK into the library by using this code in my build.gradle file. 通过使用build.gradle文件中的此代码成功将flurry SDK集成到库中之后。

    compile 'com.flurry.android:analytics:6.8.0'

I created java Class to integrate my API Key into my code, and since Im running my app on an external device I suppose some data needs to show on my flurry account, but it is now four days and nothing changed, only zeros are showing on my dashboard ... 我创建了Java类以将我的API密钥集成到我的代码中,并且由于我在外部设备上运行我的应用程序,因此我认为一些数据需要在我的flurry帐户上显示,但是现在是四天,并且没有任何变化,因此仅显示零我的仪表板...

Also, i have this message on my java file 另外,我在我的java文件中有此消息

Class 'MyApplication' is never used 从未使用“ MyApplication”类

在此处输入图片说明

Ps: I'm new to android studio ps:我是android studio的新手

You must specify MyApplication in manifest file. 您必须在清单文件中指定MyApplication It will not be used otherwise: 否则将不会使用它:

<application
    android:name=".MyApplication"
    ....

It's a class, not an activity. 这是一堂课,而不是一项活动。 So you should write it as : 所以你应该这样写:

<application
    android:name=".MyApplication" //you should write like this
    android:allowBackup="true"
</application>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM