Error:No resource found that matches the given name (at 'theme' with value '@style/MaterialTheme')

Error:No resource found that matches the given name (at 'theme' with value '@style/MaterialTheme')

我正在尝试在 android 工作室中开发对象检测应用程序,但它给我一个错误。 错误在这一行 android:theme="@style/MaterialTheme"

manifest.xml

    <uses-permission android:name="android.permission.CAMERA" />
    <uses-feature android:name="android.hardware.camera" />
    <uses-feature android:name="android.hardware.camera.autofocus" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

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

    <application android:allowBackup="true"
        android:debuggable="true"
        android:label="@string/app_name"
        android:icon="@drawable/ic_launcher"
        android:theme="@style/MaterialTheme">

        <activity android:name="org.tensorflow.demo.ClassifierActivity"
                  android:screenOrientation="portrait"
                  android:label="@string/activity_name_classification">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity android:name="org.tensorflow.demo.DetectorActivity"
                  android:screenOrientation="portrait"
                  android:label="@string/activity_name_detection">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity android:name="org.tensorflow.demo.StylizeActivity"
                  android:screenOrientation="portrait"
                  android:label="@string/activity_name_stylize">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest 

只是给出一个可能对其他人稍后提出的问题有帮助的答案。如果您不需要任何自定义主题,则可以删除该属性。如果 res/values 中不存在,则创建一个 style.xml 并检查该特定 <style></style> 资源是否存在。如果没有,那么您可以创建一个。希望这有帮助。