我有以下 R 无法识别的文件。无法识别的文件是 arrow2.png。代码如下
在pkg2
Marker instructionMarker = mMap.addMarker(new MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(R.drawable.arrow2)) //This is where it fails to recognize resource
.flat(true)
.position(instructionAnchorPoint)
.snippet(instruction+"--"+distance));
文件目录如下
project
/src
/pkg1_mainpkg
some java files
/pkg2
some java files
/pkg3
some java files
/gen
/pkg4
R.java
/pkg1_mainpkg
R.java (contains the id for "arrow2", defined as **public static final int arrow2=0x7f020000;**)
/res
/drawable-hdpi
arrow2.png
...
/drawable-ldpi
arrow2.png
...
/drawable-mdpi
arrow2.png
...
/layout
/values