简体   繁体   English

Flurry集成Android抛出错误

[英]Flurry integration Android throwing errors

I'm trying to integrate flurry into my android app. 我正在尝试将flurry集成到我的android应用中。 I'm using the recommended setting and have repositories{jcenter()} and 我正在使用推荐的设置,并且有存储库{jcenter()}和

// Required for Flurry Analytics integration compile 'com.flurry.android:analytics:8.2.0@aar' // Optional - If you want to use the Ads SDK compile 'com.flurry.android:ads:8.2.0@aar'

in the gradle as the docs suggest. 在文档建议的gradle中。 I keep getting errors in the that Application is not resolved. 在该应用程序未解决的情况下,我不断收到错误消息。 The docs really blow and I'm not 100% sure what going on. 该文档真的很打击,我不是100%知道发生了什么。 I've never integrated flurry before can someone please help! 我从来没有集成过Flurry,有人可以帮忙! I put the manifest and the class i'm using below. 我将清单和我正在使用的类放在下面。 I know it doesn't have a key I'm still working on removing errors. 我知道它没有密钥,我仍在努力消除错误。 I'm dumping the that class in the main file for simplicity for now. 为了简单起见,我将那个类转储到主文件中。

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="tempconversion.october.com.myapplication">
    <!-- Required permissions - Internet access -->
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <!-- Highly Recommended permission - External memory pre-caching -->
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <!-- Optional permission - Location based ad targeting -->
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <application

        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="F to C and K"
        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>

</manifest>

class in main file 主文件中的类

    public class MyApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();

        new FlurryAgent.Builder()
                .withLogEnabled(true)
                .withCaptureUncaughtExceptions(true)
                .withContinueSessionMillis(10)
                .withLogLevel(VERBOSE)
                .build(this, FLURRY_API_KEY);
    }
}

Declare the application name in manifest.xml file. 在manifest.xml文件中声明应用程序名称。

 <application
    android:name=".MyApplication"
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="F to C and K"
    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>

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

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