2017-05-30 14 views
-1

に私は私のマニフェストXMLファイルにエラーが出るには:「未解決のクラス」エラーのAndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.example.shaikhaalothman.playsongservice"> 

    <application 
     android:allowBackup="true" 
     android:icon="@mipmap/ic_launcher" 
     android:label="@string/app_name" 
     android:roundIcon="@mipmap/ic_launcher_round" 
     android:supportsRtl="true" 
     android:theme="@style/AppTheme"> 
     <activity android:name=".MainActivity"> 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 

     <service 
      android:name=".PlaySongService" 
      android:enabled="true" 
      android:exported="true"></service> 
    </application> 

</manifest> 

をし、それがこのラインで私にエラーを与える:

android:name=".PlaySongService" 

とエラー読み:

未解決のクラスのPlaySongService "

Android XMLファイル内のリソース参照を検証します。

Stackoverflowなどで私のエラーを解決するのに役立つものは何も見つかりませんでした。私が間違っていることを知っている人は誰ですか? com.example.shaikhaalothman.playsongserviceという名前の同じパッケージ で

+0

あなたのプロジェクトには.PlaySongServiceクラスがあります –

+0

あなたのプロジェクトをきれいにしてみてください。 (PlaySongServiceクラスがNileshのようにあなたのプロジェクトにあると仮定します) – Prexx

+0

PlaySongServiceのパッケージとは何ですか? com.example.shaikhaalothman.playsongserviceでなければなりません。それ以外の場合、クラスは見つかりません。 – Chnoch

答えて

1

PUT PlaySongService.javaMainActivity.javaは、それが自動的に を解決します。

関連する問題