当前位置 : 主页 > 手机开发 > android >

android – dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)中的类加载错误

来源:互联网 收集:自由互联 发布时间:2021-06-11
无法运行以下项目,项目中没有错误.我已经多次运行该项目了.请有人帮我解决问题. AndroidManifest.xml中: manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.extremefitness.org" and
无法运行以下项目,项目中没有错误.我已经多次运行该项目了.请有人帮我解决问题.

AndroidManifest.xml中:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.extremefitness.org"
    android:versionCode="1"
    android:versionName="1.0" >

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

    <uses-permission android:name="android.permission.INTERNET" >
    </uses-permission>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" >
    </uses-permission>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" >
    </uses-permission>
    <uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
    <uses-permission android:name="android.permission.CLEAR_APP_CACHE" >
    </uses-permission>
    <uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".TabbarActivity"
            android:windowSoftInputMode="adjustPan|adjustResize" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".HomeActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|adjustResize" >
        </activity>
        <activity
            android:name="com.extremefitness.views.LoginActivity"
            android:noHistory="true"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|adjustResize" >
        </activity>
        <activity
            android:name="com.extremefitness.views.RegisterActivity"
            android:noHistory="true"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|adjustResize" >
        </activity>
        <activity
            android:name="com.extremefitness.views.ProfileTabActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|adjustResize" >
        </activity>
        <activity
            android:name="com.extremefitness.views.RandomWorkoutTabActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|adjustResize" >
        </activity>
        <activity
            android:name="com.extremefitness.views.TrackTabActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|adjustResize" >
        </activity>
        <activity
            android:name="com.extremefitness.views.WorkoutTabActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|adjustResize" >
        </activity>
        <activity
            android:name="com.extremefitness.views.StatsActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|adjustResize" >
        </activity>
        <activity
            android:name="com.extremefitness.views.ExerciseActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|adjustResize" >
        </activity>
        <activity
            android:name="com.extremefitness.views.CustomDialog"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|adjustResize" >
        </activity>
        <activity
            android:name="com.extremefitness.views.WorkoutDescription"
            android:noHistory="true"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|adjustResize" >
        </activity>
        <activity
            android:name="com.extremefitness.views.ExerciseDescription"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|adjustResize" >
        </activity>
        <activity
            android:name="com.extremefitness.views.Settings"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|adjustResize" >
        </activity>

        <activity
            android:name="com.extremefitness.views.RandomWorkoutResponse"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|adjustResize" >
        </activity>
        <activity
            android:name=".FBActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|adjustResize" >
        </activity>
        <activity
            android:name=".TwitterActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|adjustResize" >
        </activity>
        <activity
            android:name="com.extremefitness.views.VideoDialog"
            android:configChanges="orientation|screenSize|keyboardHidden"
            android:screenOrientation="nosensor" >
            <meta-data
                android:name="@string/minVersion"
                android:value="8" />
            <meta-data
                android:name="@string/isLaunchableActivity"
                android:value="true" />
        </activity>
        <activity
            android:name="com.extremefitness.views.WorktVideoDialog"
            android:configChanges="orientation|screenSize|keyboardHidden"
            android:screenOrientation="nosensor" >
            <meta-data
                android:name="@string/minVersion"
                android:value="8" />
            <meta-data
                android:name="@string/isLaunchableActivity"
                android:value="true" />
        </activity>
    </application>

</manifest>

错误的日志:

04-26 14:45:08.211: E/AndroidRuntime(2179): FATAL EXCEPTION: main
04-26 14:45:08.211: E/AndroidRuntime(2179): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.extremefitness.org/com.extremefitness.org.TabbarActivity}: java.lang.ClassNotFoundException: com.extremefitness.org.TabbarActivity
04-26 14:45:08.211: E/AndroidRuntime(2179):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1894)
04-26 14:45:08.211: E/AndroidRuntime(2179):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1995)
04-26 14:45:08.211: E/AndroidRuntime(2179):     at android.app.ActivityThread.access$600(ActivityThread.java:128)
04-26 14:45:08.211: E/AndroidRuntime(2179):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1161)
04-26 14:45:08.211: E/AndroidRuntime(2179):     at android.os.Handler.dispatchMessage(Handler.java:99)
04-26 14:45:08.211: E/AndroidRuntime(2179):     at android.os.Looper.loop(Looper.java:137)
04-26 14:45:08.211: E/AndroidRuntime(2179):     at android.app.ActivityThread.main(ActivityThread.java:4517)
04-26 14:45:08.211: E/AndroidRuntime(2179):     at java.lang.reflect.Method.invokeNative(Native Method)
04-26 14:45:08.211: E/AndroidRuntime(2179):     at java.lang.reflect.Method.invoke(Method.java:511)
04-26 14:45:08.211: E/AndroidRuntime(2179):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:993)
04-26 14:45:08.211: E/AndroidRuntime(2179):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)
04-26 14:45:08.211: E/AndroidRuntime(2179):     at dalvik.system.NativeStart.main(Native Method)
04-26 14:45:08.211: E/AndroidRuntime(2179): Caused by: java.lang.ClassNotFoundException: com.extremefitness.org.TabbarActivity
04-26 14:45:08.211: E/AndroidRuntime(2179):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
04-26 14:45:08.211: E/AndroidRuntime(2179):     at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
04-26 14:45:08.211: E/AndroidRuntime(2179):     at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
04-26 14:45:08.211: E/AndroidRuntime(2179):     at android.app.Instrumentation.newActivity(Instrumentation.java:1027)
04-26 14:45:08.211: E/AndroidRuntime(2179):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1885)
04-26 14:45:08.211: E/AndroidRuntime(2179):     ... 11 more
我遇到同样的问题,检查构建路径,你的第三个罐子没有在你的apk文件中. 1.右键单击您的项目,选择“构建路径” – > “配置构建路径…”. 2.在“订购和导出”选项卡中,选中“Android私有库”选项. 希望工作.
网友评论