开发者

How to generate R.java manually on Linux platform

开发者 https://www.devze.com 2022-12-25 18:49 出处:网络
I am developing android application on Linux platform because i have to make a system.img with a appl开发者_如何学Goication.

I am developing android application on Linux platform because i have to make a system.img with a appl开发者_如何学Goication.

When adding a drawable resource and building the project with mm command, i met a below error.

"cannot find symbol R.drawable.icon_send_type"

At above error, the icon_send_type is the added resource.

This error occurred because the mm command did not generate R.java.

So, I want to know how to generate R.java by a manual on Linux platform.


I solved the error that the R.java was not generated by mm command on linux platform.

The drawable resource's date was the problem.

I used a linux's touch command in res/drawable folder and i run the mm command, then R.java generated renewedly.


Try to remove the R.stamp file from your intermediates directory, like

out/target/common/obj/YOUR_APP_intermediates/src/R.stamp


Developing on Linux is no reason for not using the whole Eclipse IDE and the integration of all the tools that it brings you.

If you can't use Eclipse you can build your project with ant. If you create a project with the Android SDK there should be an ant file that helps you to build your project. I recommend reading this part of the documentation on how to work with other IDEs or without Eclipse.


I found tons of solutions about this problem, none worked. My problem relied on Android SDK installation. The ADT plugin for eclipse installed the SDK without the build tools, incredible but true.

So I brought to sight the Android sdk manager: windows --> customize perspectives... --> command groups availability (I checked Android SDK and AVD manager)

After that I installed the build tools: Window --> Android SDK manager (I checked the build tools for android)

Close and restart eclipse Finally the CLEAN command worked

0

精彩评论

暂无评论...
验证码 换一张
取 消