今天是糟糕的一天。我试图测试Android Studio但没有成功。现在的问题是,我有完整的代码,停止工作。我这样做:
在那一刻,我可以将应用程序午餐到我的手机中,但是出现了Google 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
manifiest.xml
<?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>
答案 0 :(得分:8)
项目/属性/ Java构建路径/订单和导出 - 如果您使用它,请确保在Android依赖项和支持库前面进行检查。