Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

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

android - AAPT: error:not well-formed (invalid token) when layout is not yours/accessible

FOA my issue is not like many others posted here since it relies to Android framework layout file, so its just impossible to modify it. Message looks like (full original message is not availale now):

.../btn_checkbox_checked_mtrl_animation_interpolator_1.xml:1: AAPT: error: not well-formed (invalid token)

the btn_checkbox_checked_mtrl_animation_interpolator_1.xml itself is a part of an Android framework and its source code could be found here for instance.
Due to some file system failure this file was damaged (it was simply empty visually in AndroidStudio but most probably was filled by undisplayable characters) and the tricky part was to find this file (cashed by gradle) on my PC at path like

c:UsersDefaultUser.gradlecachesransforms-2files-2.16ba13ebdd2c38cf830b84d1ee5597dde...

The solution is to delete the whole directory 6ba13ebdd2c38cf830b84d1ee5597dde (probably only the target file deletion is enough). After deleting this folder Android Studio become able to build my project and gradle recreated the deleted cache. And the problem wa solved this way.
This is not actually a question since it has a solution/answer already. It dedcicated to an uncommon problem/solution.


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

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...