【发布时间】:2013-12-03 11:36:08
【问题描述】:
大家好,我正在尝试从 Git 中心编译此代码,但出现错误(我尝试开始时应用程序崩溃)
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.viewpagerparallax/com.example.viewpagerparallax.MyTestActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.viewpagerparallax.MyTestActivity" on path: DexPathList[[zip file "/data/app/com.example.viewpagerparallax-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.viewpagerparallax-1, /vendor/lib, /system/lib]]
没有堆栈溢出问题/解决方案帮助了我。
此外,当我切换到 main.xml 布局视图时,它会显示
The following classes could not be found:
- com.example.viewpagerparallax (Fix Build Path, Edit XML, Create Class)
虽然.java文件存在于同一个包中
这是我的清单文件(在我的情况下,我已将包名称更改为 com.example.viewpagerparallax.MyTestActivity ) 这是清单文件
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.viewpagerparallax"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.viewpagerparallax.MyTestActivity"
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>
这是我关注的链接
https://github.com/MatthieuLJ/ViewPagerParallax 如果您需要这些文件,请告诉我。
请帮忙 在此先感谢
【问题讨论】:
-
清理您的项目并尝试...
-
您的代码中是否添加了第三方jar文件?
-
@gopal Rao 试了几次都没有结果。
-
@Siddarth Vyas 我下载了整个代码,没有提到任何内容,但没有添加 jar 文件,代码如何编译仍然是一个新手。我不知道
-
再次下载项目并再次运行,我下载并运行良好
标签: android android-layout android-intent