android - 致命异常 applicationId 为空解析

标签 android parse-platform fatal-error

这是我在 SO 中的第二个问题,我有一个关于 Fatal Main 错误的问题。在我问之前,我在 SO 中发现了一些其他问题,但我发现的是关于 Facebook 应用程序 这是我的错误

java.lang.RuntimeException: applicationId is null. You must call Parse.initialize(context, applicationId, clientKey) before using the Parse library.

但是,我有一个声明它的类

package com.example.michael.eksperimen6chatting;

import android.app.Application;

import com.parse.Parse;

/**
 * Created by Michael on 03/12/2015.
 */
public class ChattApp extends Application
{
    @Override
    public void onCreate()
    {
        super.onCreate();

        Parse.initialize(this, "urkcFwvUmgSYvuOFTInJmkA3iWv0ArV3XT128TNb", "WvBC0cnGXHkVhTBbkFwLyxGDRgqR6qC8ft7DIleT");
    }
}

这是我的 list

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.michael.eksperimen6chatting" >

    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>



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

        <activity android:name=".MainActivity" >

        </activity>
        <activity android:name=".UserList"></activity>
        <activity android:name=".Login">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

        <activity android:name=".Chat">

        </activity>

    </application>



</manifest>

我在这里错过了什么吗,有人可以帮助我吗?感谢

最佳答案

指定 ChattApp AndroidManifest.xml 中的应用程序类名称的 <application>标签。

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:name="com.example.michael.eksperimen6chatting.ChattApp">
  ....
</application>

关于android - 致命异常 applicationId 为空解析,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34193950/

相关文章:

ios - 展开可选值 : swift 2. 1 时意外发现 nil

android - 安卓应用中的Andengine

android - 当相机以其为中心时,Box2D 主体滞后/跳跃

ios - 从 Parse 中检索信息

php - 如何在 php 中检索 Parse.com 用户详细信息

android - 致命信号 11 (SIGSEGV)、代码 1 (SEGV_MAPERR)、故障地址 0xe9103aa560080 in tid 31072 (ReferenceQueueD)、pid 31058

github - Git 坏文件 fatal error

android - 如何在 RecyclerView 中隐藏 View

android - 如何减少背景图片的内存占用?

ios - 解析查询未按降序加载