Google analytics - 'String xml configuration name not recognized'

雨燕双飞 提交于 2019-12-13 05:34:27

问题


I'm attempting to utilize Google Analytics in my app and encountering a few issues. Upon running the app I get the following logcat messages:

03-12 23:27:11.107 25448-25448/il.ac.shenkar.david.todolistex2 W/GAv4: String xml configuration name not recognized: il.ac.shenkar.david.todolistex2.MainActivity
03-12 23:27:11.111 25448-25448/il.ac.shenkar.david.todolistex2 W/GAv4: String xml configuration name not recognized: il.ac.shenkar.david.todolistex2.EditTaskActivity
03-12 23:27:11.111 25448-25448/il.ac.shenkar.david.todolistex2 W/GAv4: String xml configuration name not recognized: il.ac.shenkar.david.todolistex2.ReportTaskStatus
03-12 23:27:11.119 25448-25448/il.ac.shenkar.david.todolistex2 W/GAv4: AnalyticsReceiver is not registered or is disabled. Register the receiver for reliable dispatching on non-Google Play devices. See http://goo.gl/8Rd3yj for instructions.
03-12 23:27:11.120 25448-25448/il.ac.shenkar.david.todolistex2 W/GAv4: CampaignTrackingReceiver is not registered, not exported or is disabled. Installation campaign tracking is not possible. See http://goo.gl/8Rd3yj for instructions.
03-12 23:27:11.151 25448-27033/il.ac.shenkar.david.todolistex2 W/GAv4: AnalyticsService not registered in the app manifest. Hits might not be delivered reliably. See http://goo.gl/8Rd3yj for instructions.

Here is my manifest.xml file:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="il.ac.shenkar.david.todolistex2"
    android:versionCode="2"
    android:versionName="2.0">

    <uses-sdk
        android:minSdkVersion="14"
        android:targetSdkVersion="23" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_CALENDAR" />
    <uses-permission android:name="android.permission.WRITE_CALENDAR" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.CAMERA" />

    <application
        android:name=".MyApplication"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:screenOrientation="portrait"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">

        <activity
            android:name=".MainActivity"
            android:label="@string/app_name"
            android:theme="@style/AppTheme.NoActionBar" />
        <activity
            android:name=".ListNodeActivity"
            android:label="@string/title_activity_list_node"
            android:parentActivityName=".MainActivity"
            android:theme="@style/AppTheme.NoActionBar">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="il.ac.shenkar.david.todolistex2.MainActivity" />
        </activity>
        <activity
            android:name=".Signup_Activity"
            android:label="@string/app_name"
            android:theme="@style/AppTheme.NoActionBar" />
        <activity
            android:name=".CreateTeam"
            android:label="Create new task team"
            android:theme="@style/AppTheme.NoActionBar" />
        <activity
            android:name=".InviteMember"
            android:label="Invite Members Your Team"
            android:theme="@style/AppTheme.NoActionBar" />
        <activity
            android:name=".Login_activity"
            android:label="Login to Wiggle"
            android:theme="@style/AppTheme.NoActionBar" />
        <activity
            android:name=".SplashScreen"
            android:label="@string/app_name"
            android:theme="@style/AppTheme.NoActionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".EditTaskActivity"
            android:label="Edit Task"
            android:theme="@style/AppTheme.NoActionBar" />
        <activity
            android:name=".SelectLocation"
            android:label="Select Location"
            android:theme="@style/AppTheme.NoActionBar" />

        <activity
            android:name=".Main2Activity"
            android:label="@string/title_activity_main2"
            android:theme="@style/AppTheme.NoActionBar">

        </activity>
        <activity
            android:name=".ReportTaskStatus"
            android:label="Report Task Status"
            android:theme="@style/AppTheme.NoActionBar"></activity>
        <!-- ATTENTION: This was auto-generated to add Google Play services to your project for
             App Indexing.  See https://g.co/AppIndexing/AndroidStudio for more information. -->
        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />

        <!-- Google Analytics Version v4 needs this value for easy tracking -->
        <meta-data android:name="com.google.android.gms.analytics.globalConfigResource"
            android:resource="@xml/global_tracker" />

        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />

    </application>
</manifest>

Here is the global_tracker.xml:

<?xml version="1.0" encoding="utf-8"?>
<resources>

<!-- the Local LogLevel for Analytics -->
<string name="ga_logLevel">verbose</string>

<!-- how often the dispatcher should fire -->
<integer name="ga_dispatchPeriod">30</integer>

<!-- Treat events as test events and don't send to google -->
<bool name="ga_dryRun">false</bool>

<!-- The screen names that will appear in reports -->
<string name="il.ac.shenkar.david.todolistex2.MainActivity">Main Activity</string>
<string name="il.ac.shenkar.david.todolistex2.EditTaskActivity">Edit Task Activity</string>
<string name="il.ac.shenkar.david.todolistex2.ReportTaskStatus">Report Task Status Activity</string>
</resources>

app_tracker.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- End current session if app sleeps for a period of time -->
    <integer name="ga_sessionTimeout">300</integer>

    <!-- Enable automatic Activity measurement -->
    <bool name="ga_autoActivityTracking">true</bool>

    <!--  The property id associated with this analytics tracker -->
    <string name="ga_trackingId">UA-75038910-1</string>

    <string name="ga_sampleFrequency">100.0</string>

    <bool name="ga_reportUncaughtExceptions">true</bool>

    <!--
      See Project Structure -> Analytics -> Google Analytics -> Learn More
      to learn more about configuring this file.
    -->
</resources>

Obviously, there are no records in my Google analytics page, how can I resolve this?

来源:https://stackoverflow.com/questions/35963708/google-analytics-string-xml-configuration-name-not-recognized

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!