我在尝试使用InputStream读取drawable file name.png时收到错误。为什么?

时间:2016-12-20 17:25:28

标签: android file-io inputstream drawable

;WITH cte
     AS (SELECT *,Row_number()OVER(partition BY [ID] ORDER BY [Attribute]) rn
         FROM   Yourtable)
SELECT [ID],
       Max(CASE WHEN rn = 1 THEN [Attribute] ELSE '' END) AS [Attribute1],
       Max(CASE WHEN rn = 2 THEN [Attribute] ELSE '' END) AS [Attribute2],
       Max(CASE WHEN rn = 3 THEN [Attribute] ELSE '' END) AS [Attribute3]
FROM   cte
GROUP  BY [ID] 

R.drawble收到的内容不匹配错误"

1 个答案:

答案 0 :(得分:0)

将资源移至res/raw/,然后使用openRawResource()R.raw.name

或者,将您的资源移至assets/,然后使用open()上的AssetManager获取InputStream