+-
AndroidManifest.xml中的“未解决的类”错误
我在清单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"

错误显示为:

Unresolved class ‘PlaySongService’

Validates resource reference inside Android XML files.

在这里,我在Stackoverflow以及其他任何地方都找不到解决我的错误的方法.知道我在做什么错的人吗?

最佳答案

PUT PlaySongService.java and MainActivity.java in Same package
named com.example.shaikhaalothman.playsongservice, it will resolved
automatically.

点击查看更多相关文章

转载注明原文:AndroidManifest.xml中的“未解决的类”错误 - 乐贴网