After installing Android Studio and installing other required SDKs or components, create a new project based on the wizard,
The following error may occur when compiling or running:
Error:error Retrieving parent for item:no Resource found that matches the given name "Xxxxxxxxxx"
Not big to determine whether other people's same error is the same reason, in my environment The problem is "Build.gradle (Module:app)" In the configuration version is too high.
When I build the project, the target Android version is 4.2.2 (API 17), and the version number of the generated file in the relevant version location is more than 23.
Modify the two places as follows:
1. Buildtoolsversion ' 22.0.1 '
The version number here is after running Android SDK manager ("Android" in the Tools directory under the Android SDK directory),
Under the Tools directory, I found the highest version under version 23, in my environment 22.0.1.
2. Compile ' com.android.support:appcompat-v7:20.0.0 '
The version number here can be found in the "EXTRAS/ANDROID/M2REPOSITORY/COM/ANDROID/SUPPORT/APPCOMPAT-V7" directory under the Android SDK directory,
After testing, the version number changes to below version 23, which can be compiled, but version 20 and above will error when running debugging.
I do not consider android4.2.2 above version of the operation, so there is no way to delve into version 20 above the solution.
If the second step above or the compilation error, you can consider the above "appcompat-v7" directory under the version 23 above the directory Delete,
And in the "Maven-metadata.xml" file in the version 23 above the setup line removed, recompile try.
Ubuntu Android Studio compile and run error retrieving parent for Item:no Resource found that matches the given name