2

今天是糟糕的一天。我试图测试 Android Studio 没有成功。现在的问题是我拥有的完整代码停止工作。我这样做:

  • 更新了 ADT 和 SDK
  • 重新安装日食
  • 从 SVN 中抢救源代码
  • 使用每个依赖项再次构建完整的应用程序
  • 解决所有链接问题

在那一刻,我可以将应用程序午餐到我的手机中,但出现了 Analytics 的问题。我评论了所有对此的引用,但现在...... Android 找不到我自己的活动!哪里有问题?在源代码中肯定不是...

请帮忙!我能做些什么?

谢谢!!

05-25 01:24:46.393: E/AndroidRuntime(7572): FATAL EXCEPTION: main
05-25 01:24:46.393: E/AndroidRuntime(7572): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{net.asturdroid.datamovie/net.asturdroid.datamovie.ui.SplashScreen}: java.lang.ClassNotFoundException: net.asturdroid.datamovie.ui.SplashScreen in loader dalvik.system.PathClassLoader[/mnt/asec/net.asturdroid.datamovie-1/pkg.apk]
05-25 01:24:46.393: E/AndroidRuntime(7572):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2709)
05-25 01:24:46.393: E/AndroidRuntime(7572):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2803)
05-25 01:24:46.393: E/AndroidRuntime(7572):     at android.app.ActivityThread.access$2300(ActivityThread.java:135)
05-25 01:24:46.393: E/AndroidRuntime(7572):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136)
05-25 01:24:46.393: E/AndroidRuntime(7572):     at android.os.Handler.dispatchMessage(Handler.java:99)
05-25 01:24:46.393: E/AndroidRuntime(7572):     at android.os.Looper.loop(Looper.java:144)
05-25 01:24:46.393: E/AndroidRuntime(7572):     at android.app.ActivityThread.main(ActivityThread.java:4937)
05-25 01:24:46.393: E/AndroidRuntime(7572):     at java.lang.reflect.Method.invokeNative(Native Method)
05-25 01:24:46.393: E/AndroidRuntime(7572):     at java.lang.reflect.Method.invoke(Method.java:521)
05-25 01:24:46.393: E/AndroidRuntime(7572):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
05-25 01:24:46.393: E/AndroidRuntime(7572):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
05-25 01:24:46.393: E/AndroidRuntime(7572):     at dalvik.system.NativeStart.main(Native Method)
05-25 01:24:46.393: E/AndroidRuntime(7572): Caused by: java.lang.ClassNotFoundException: net.asturdroid.datamovie.ui.SplashScreen in loader dalvik.system.PathClassLoader[/mnt/asec/net.asturdroid.datamovie-1/pkg.apk]
05-25 01:24:46.393: E/AndroidRuntime(7572):     at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
05-25 01:24:46.393: E/AndroidRuntime(7572):     at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
05-25 01:24:46.393: E/AndroidRuntime(7572):     at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
05-25 01:24:46.393: E/AndroidRuntime(7572):     at android.app.Instrumentation.newActivity(Instrumentation.java:1036)
05-25 01:24:46.393: E/AndroidRuntime(7572):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2701)
05-25 01:24:46.393: E/AndroidRuntime(7572):     ... 11 more

清单文件

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="net.asturdroid.datamovie"
    android:installLocation="preferExternal"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />

    <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" />

    <application
        android:name="net.asturdroid.datamovie.App"
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:screenOrientation="nosensor"
        android:theme="@style/Theme.AppTheme" >
        <activity
            android:name=".ui.SplashScreen"
            android:configChanges="locale|layoutDirection"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".ui.MainActivity"
            android:configChanges="locale|layoutDirection"
            android:label="@string/app_name" >
        </activity>
        <activity
            android:name=".ui.about.AppInfoActivity"
            android:configChanges="locale|layoutDirection"
            android:label="@string/app_name" >
        </activity>
        <activity
            android:name=".ui.GenericFragmentActivity"
            android:configChanges="locale|layoutDirection"
            android:label="@string/app_name" >
        </activity>
        <activity
            android:name=".ui.MovieDetailActivity"
            android:configChanges="locale|layoutDirection"
            android:label="@string/app_name"
            android:uiOptions="splitActionBarWhenNarrow" >
        </activity>
        <activity
            android:name=".ui.ListActivity"
            android:configChanges="locale|layoutDirection"
            android:uiOptions="splitActionBarWhenNarrow" >
        </activity>

    </application>

</manifest>

类路径:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
    <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
    <classpathentry kind="src" path="gen"/>
    <classpathentry kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
    <classpathentry kind="output" path="bin/classes"/>
</classpath>
4

1 回答 1

8

Project/Properties/Java Build Path/Order and Export -- 如果你使用它,请确保在 Android Dependencies 和支持库前面有一个检查。

于 2013-05-24T23:39:27.410 回答