08-16 01:32:28.900: ERROR/AndroidRuntime(303): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.wjs/com.wjs.service.Mp3DownloadService}; have you declared this activity in your AndroidManifest.xml?
今天这个错误纠缠我好久,老提示我没在AndroidManifest.xml注册,但是我已经注册了呀
  <?xml version="1.0" encoding="utf-8" ?> 
- <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.wjs" android:versionCode="1" android:versionName="1.0">
  <uses-sdk android:minSdkVersion="7" /> 
- <application android:icon="@drawable/icon" android:label="@string/app_name">
- <activity android:name=".Test" android:label="@string/app_name">
- <intent-filter>
  <action android:name="android.intent.action.MAIN" /> 
  <category android:name="android.intent.category.LAUNCHER" /> 
  </intent-filter>
  </activity>
  <service android:name=".service.Mp3DownloadService" /> 
  </application>
  </manifest>
我上网找过有的说路径有问题,可是我什么路径都尝试过了,像全路径com.wjs.service.Mp3DownloadService,service.Mp3DownloadService等都不行!

解决方案 »

  1.   

    <service android:name=".service.Mp3DownloadService" />   把这个写全了试试
      

  2.   

     {com.wjs/com.wjs.service.Mp3DownloadService}; 
    这个提示,怎么好像是找了两次?把.去掉试试。或者写上完整的路径名
      

  3.   

    决绝了!我把setservice()写成setatvitity()了
      

  4.   

    intent.setClass(this, DownloadService.class);
    是把
    startService(intent);
    写成startActivity(intent);
    自做聪明了 其实学android最大的阻力是英文API  其他没什么
      

  5.   

     我也是startService写成了startActivity了