Reputation: 187
I want access to R.java
using InputStream
, in order to get the key of the resource.
File file = new File("gen/com/XX/R.java") ;
new FileInputStream(file) ;
I had used two file path gen/com/XX/R.java or com/XX/R.java
But return inputStream
object is null.
Who can tell me R.java
can access? if can do it, how to do? Can anyone give me some suggestion?
Thanks .
Upvotes: 0
Views: 155
Reputation: 33792
From the last three questions I've seen that you are trying to modify the apk. The apk is just a glorified zip file.
And if you are trying to edit it, you're doing it completely wrong.
Upvotes: 0
Reputation: 9520
There is no need to access R.java using file objects. it will be dynamic memory location when you run the application. and what thing drives you do read R.java, please share your requirement so we can suggest best possible solution. because you are going on wrong path.
Upvotes: 1