如何解决未找到的类异常

时间:2015-10-05 08:05:15

标签: android android-manifest classnotfoundexception google-login

我正在创建一个应用程序,并且我实现了facebook和google登录但是当我尝试运行我的应用程序时它总是崩溃并显示以下错误,任何人都可以告诉我什么是问题以及我犯了什么错误?

logcat的

E/AndroidRuntime(14961): FATAL EXCEPTION: main
10-05 12:34:24.713: E/AndroidRuntime(14961): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.nummero.balloonations/com.nummero.balloonations.AndroidGooglePlusExample}: java.lang.ClassNotFoundException: com.nummero.balloonations.AndroidGooglePlusExample

E / AndroidRuntime(14961):在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1894)     10-05 12:34:24.713:E / AndroidRuntime(14961):在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1995)     10-05 12:34:24.713:E / AndroidRuntime(14961):在android.app.ActivityThread.access $ 600(ActivityThread.java:128)     10-05 12:34:24.713:E / AndroidRuntime(14961):在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1161)     10-05 12:34:24.713:E / AndroidRuntime(14961):在android.os.Handler.dispatchMessage(Handler.java:99)     10-05 12:34:24.713:E / AndroidRuntime(14961):在android.os.Looper.loop(Looper.java:137)     10-05 12:34:24.713:E / AndroidRuntime(14961):在android.app.ActivityThread.main(ActivityThread.java:4517)     10-05 12:34:24.713:E / AndroidRuntime(14961):at java.lang.reflect.Method.invokeNative(Native Method)     10-05 12:34:24.713:E / AndroidRuntime(14961):at java.lang.reflect.Method.invoke(Method.java:511)     10-05 12:34:24.713:E / AndroidRuntime(14961):at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:993)     10-05 12:34:24.713:E / AndroidRuntime(14961):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)     10-05 12:34:24.713:E / AndroidRuntime(14961):at dalvik.system.NativeStart.main(Native Method)     10-05 12:34:24.713:E / AndroidRuntime(14961):引起:java.lang.ClassNotFoundException:com.nummero.balloonations.AndroidGooglePlusExample     10-05 12:34:24.713:E / AndroidRuntime(14961):at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)     10-05 12:34:24.713:E / AndroidRuntime(14961):at java.lang.ClassLoader.loadClass(ClassLoader.java:501)     10-05 12:34:24.713:E / AndroidRuntime(14961):at java.lang.ClassLoader.loadClass(ClassLoader.java:461)     10-05 12:34:24.713:E / AndroidRuntime(14961):在android.app.Instrumentation.newActivity(Instrumentation.java:1027)     10-05 12:34:24.713:E / AndroidRuntime(14961):在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1885)     10-05 12:34:24.713:E / AndroidRuntime(14961):... 11更多

清单

<!-- language: lang-xml -->
    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.nummero.balloonations"
        android:versionCode="1"
        android:versionName="1.0" >

        <uses-sdk
            android:minSdkVersion="13"
            android:targetSdkVersion="21" />

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



        <supports-screens
            android:anyDensity="true"
            android:largeScreens="true"
            android:normalScreens="true"
            android:resizeable="true"
            android:smallScreens="true"
            android:xlargeScreens="true" />

        <application
            android:allowBackup="true"
            android:icon="@drawable/ic_launcher"
            android:label="@string/app_name"
            android:theme="@style/AppTheme" >
            <activity
                android:name=".MainActivity"
                android:label="@string/app_name" >
            </activity>
            <activity
                android:name="SplashScreen"
                android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
            </activity>
            <activity android:name="com.nummero.balloonations.Login" >
            </activity>
            <activity android:name="Registration" >
            </activity>
            <activity android:name="SelectionofCity" >
            </activity>
            <activity android:name="com.facebook.LoginActivity" >
            </activity>

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

            <activity
                android:name=".AndroidGooglePlusExample"
                android:label="@string/app_name" >
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />

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

    </manifest>

0 个答案:

没有答案