No resource identifier found for attribute 'parentActivityName' in package 'android'

后端 未结 4 762
感情败类
感情败类 2020-12-30 19:19

I\'m trying to complete this tutorial from the Android Page http://developer.android.com/training/basics/firstapp/starting-activity.html But I Eclipse throws this error: \"

相关标签:
4条回答
  • 2020-12-30 20:04

    To add to David Wasser's answer, if you use Eclipse and have the correct SDK library installed but still have this error, it means that while the correct library is installed Eclipse does not use it for this project.

    To change that, go to your project's Properties (right-click on its name in the Package Explorer and it's the last but one option), select Android in the left hand column and you should have a list called Project Build Target. Then:

    • Select the appropriate target (Android 4.2.2 or Google APIs for Platform 4.2.2 in this instance)

    • Save your Manifest file (make a trivial edit if necessary)

    Once it is saved Eclipse will process it and those errors should disappear as Eclipse finds the resource identifier in its new build target.

    0 讨论(0)
  • 2020-12-30 20:08

    android:parentActivityName appears first in Android 4.1 (API level 16). You need to have the latest 4.1 SDK to compile this.

    0 讨论(0)
  • 2020-12-30 20:08

    In IntelliJ IDEA, you need to change in Platform Settings->SDKs->Android something->Build target TO 4.1+.

    If you don't see the option, you need an SDK version 4.1 or higher (API level 16+).

    0 讨论(0)
  • 2020-12-30 20:11

    This error will also happen if you don't have the exact version of the SDK that the sample app uses as it's build target. Following the same steps as Julien describes above and choosing an SDK you have locally will fix it.

    0 讨论(0)
提交回复
热议问题