0

I am facing this error

04-03 15:00:16.474: E/AndroidRuntime(1291): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.demo.youtubeapitest.MainActivity" on path: /data/app/com.demo.youtubeapitest-1.apk

I have tried the solutions like including the package name before the activity name in the manifest file but the problem is still unsolved. Here is my manifest file. Could any please help me solve this problem? Thanks

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.demo.youtubeapitest"
android:versionCode="1"
android:versionName="1.0" >

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

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

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name="com.demo.youtubeapitest.MainActivity"
        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>
Pang
  • 9,564
  • 146
  • 81
  • 122
Heidi
  • 111
  • 2
  • 13
  • Where is MainActivity? in `(default package)` or `com.demo.youtubeapitest` package? – Weiyi Apr 04 '15 at 14:17
  • It is in com.demo.youtubeapitest package. – Heidi Apr 04 '15 at 14:19
  • I find a question similar to yours, maybe you can have a try [Android Activity ClassNotFoundException - tried everything](http://stackoverflow.com/questions/10866431/android-activity-classnotfoundexception-tried-everything) – Weiyi Apr 05 '15 at 02:15
  • @li2 I tried that solution but I do not see anything in **Properties -> Android, the Library section** it is empty and disabled. So still cannot make it work. – Heidi Apr 05 '15 at 05:38
  • try this **clean your project, then uninstall & install the app**, I have no idea if this doesn't work – Weiyi Apr 05 '15 at 06:20
  • @li2 just tried. Didn't work :( – Heidi Apr 05 '15 at 06:27
  • did you solve this problem? I encounter this problem today, and solved it refer to [THIS ANSWER](https://stackoverflow.com/a/26151468/2722270) [![enter image description here](http://i.stack.imgur.com/ACCmD.png)](http://i.stack.imgur.com/ACCmD.png) – Weiyi Aug 02 '15 at 04:48

0 Answers0