Question

I met exactly the same issue as in Android Build in Eclipse not generating the right resource ids in R.java, since that link doesn't have a "renderscript" tag, I reported it here again with some additional info.

In sum, if I create a library project and added some custom renderscripts the following issue will occur. If I link the library project with another UI project by adding

android.library.reference.1=..xxx

in the UI project's project.properties file, then calling findViewById() in that UI project will always return null, no matter what I did. If I remove the custom renderscript in the library project, the UI project works fine.

I also tried to delete all the possible resources in the library project (only the renderscript resource was kept), the same issue occurs. So this proves that the issue was caused by renderscript.

I'm working with the latest SDK bundle "adt-bundle-windows-x86-20131030" and Android SDK Tools version 22.3, Platform tools version 19, Build tools version 19.

The same issue occurs in the earlier SDK versions as well.

Is this a bug with Eclipse ADT? Is there any workaround solution before a fix. Thank you!

Update: Some updates. I found a "solution" to this issue. If I use the old "adt-bundle-windows-x86-20130729" SDK bundle to compile and launch the application (it will success) and then switch back to the "adt-bundle-windows-x86-20130917" or the "adt-bundle-windows-x86-20131030" (the new ones), this problem will disappear! I tried this in two machines and it all behave like that. I don't know the reason why but hope this will help you if you meet the same problem.

Was it helpful?

Solution

Some updates. I found a "solution" to this issue. If I use the old "adt-bundle-windows-x86-20130729" SDK bundle to compile and launch the application (it will success) and then switch back to the "adt-bundle-windows-x86-20130917" or the "adt-bundle-windows-x86-20131030" (the new ones), this problem will disappear! I tried this in two machines and it all behave like that. I don't know the reason why but hope this will help you if you meet the same problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top