Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
527 views
in Technique[技术] by (71.8m points)

gradle - Error:In <declare-styleable> SherlockSpinner, unable to find attribute android:popupPromptView

My project contains "ActionBar Sherlock Pull to refresh" and compiles and runs fine with API level 21 and earlier but when i am trying to compile it with API 22, i'm getting this error:

Error:In <declare-styleable> SherlockSpinner, unable to find attribute android:popupPromptView
Error:Execution failed for task ':app:processDebugResources'.

com.android.ide.common.internal.LoggedErrorException: Failed to run command: /Users/m./Android_SDK/build-tools/21.1.2/aapt package -f --no-crunch -I /Users/m./Android_SDK/platforms/android-22/android.jar -M /Users/m./AndroidStudioProjects/-android/android/build/intermediates/manifests/full/debug/AndroidManifest.xml -S /Users/m./AndroidStudioProjects/-android/android/build/intermediates/res/debug -A /Users/m./AndroidStudioProjects/-android/android/build/intermediates/assets/debug -m -J /Users/m./AndroidStudioProjects/-android/android/build/generated/source/r/debug -F /Users/m./AndroidStudioProjects/-android/android/build/intermediates/res/resources-debug.ap_ --debug-mode --custom-package ir.fax.android -0 apk --output-text-symbols /Users/m./AndroidStudioProjects/-android/android/build/intermediates/symbols/debug Error Code: 1 Output: warning: string 'dashboard_account_type_click_msg_1' has no default translation. warning: string 'dashboard_number_click_msg_1' has no default translation. warning: string 'dashboard_number_click_msg_2' has no default translation. warning: string 'dashboard_number_click_msg_3' has no default translation. warning: string 'days_after' has no default translation. warning: string 'days_before' has no default translation. warning: string 'extra_cred_response' has no default translation. warning: string 'free_pages_remaining_server_response' has no default translation. warning: string 'hours_after' has no default translation. warning: string 'hours_before' has no default translation. warning: string 'invalid' has no default translation. warning: string 'invit1' has no default translation. warning: string 'invit2' has no default translation. warning: string 'invit25' has no default translation. warning: string 'invit3' has no default translation. warning: string 'minutes_after' has no default translation. warning: string 'minutes_before' has no default translation. warning: string 'seconds_after' has no default translation. warning: string 'seconds_before' has no default translation. warning: string 'total_page_remaining_response' has no default translation. ERROR: In SherlockSpinner, unable to find attribute android:popupPromptView

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Solution if you are using gradle :

android {
  compileSdkVersion 22
  buildToolsVersion '22.0.1'
[...]
}

If you are using an android projet in Eclipse : upgrade the build tools version to 22.0.1 in the SDK manager.

Cause of the problem :

/Users/m./Android_SDK/build-tools/21.1.2 should match /Users/m./Android_SDK/platforms/android-22

I had the same problem after I downloaded android SDK platform 22. Upgrading the build tools to 22.0.1 fixed it.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...