开发者

URI Exception at insert query

I am trying to create a Co开发者_运维百科ntentProvider and getting exception at insert query. I tried different google searches, couldn't fix it can you please tell me where I am messing up the URI, thanks.

The error is

java.lang.IllegalArgumentException: 
Unknown URL content://com.ranj.ContenProvExample/phonebook

1) Here is my URI in Class ContenProvExample extends ContentProvider:

public static final 
Uri CONTENT_URI = Uri.parse("content://com.ranj.ContenProvExample/phonebook");

2) Here is my AndroidManifest:

<provider android:name=".ContenProvExample"
          android:authorities="com.ranj.contenprovexample"  
          />

3) Getting error at an Activity inside onCreate():

ContentResolver cnrslvr = getContentResolver();
cnrslvr.insert(ContenProvExample.Constants.CONTENT_URI, getValues());
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜