Adding Google-play-services crashes aapt.exe

与世无争的帅哥 提交于 2019-12-11 20:40:12

问题


I'm trying to use google maps v2 for android by adding the google-play-services to my app as a library. Everytime I set a reference to the library I get windows dialog with the message that aapt.exe has crashed. And after I've set a reference to the library all my source files get errors. R.java in my gen folder gets deleted. Console is giving this message

[google-play-services_lib] R.java was modified manually! Reverting to generated version!

After deleting the reference to the google-play-services library the errors disappear. I'm using Eclipse Helio with SDK tools rev 22.0.1

I tried almost every solution/suggestion people have told in that thread.

Can someone help me out?


回答1:


After you add the Google-play-services_lib to your project using eclipse project properties, you go to view project.properties file in your project folder ( a simple text file that you can edit). Check if the android.library.reference.1="your Google-play-services_lib path" is correct.
You don't need to copy Google-play-services_lib folder to your project like in Google instruction, but the path in project.properties should be correct. I prefer full path like "c:\android-sdk..." .
Eclipse creates a relative path which is wrong. It worked for me after I corrected the path.




回答2:


I realize it's 18 months later now. I couldn't get google-play-services_lib to work as a lib projecte in the Android tab in project settings. But importing it as an Android project and referencing it as a project (in the "projects" tab in Java Build Path) did work.



来源:https://stackoverflow.com/questions/16928956/adding-google-play-services-crashes-aapt-exe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!