I use latest Android Studio 0.8.4 (for OS X), in \"res\" directory I create new \"database\" directory and put there all files what I need and when I try to compile I receiv
I am having the same problem What I did is,
You need to clear the cache data
Go to Build(Menu)--> Clean Project
Then
Go to Build(Menu)--> Rebuild Project
Then Run Your project
This may also help in refreshing data of android preview
Try the following steps
Build Menu
.Clean Project
.Build Menu
.Rebuild Project
.It worked for me.
You might want to clean caches
C:\Users\<username>\.gradle\caches
I removed all of the compile statements. Then, I deleted the jar files from libs (and selected 'safe delete'). Once that was done, I dragged the jar file back into libs. Once there, I right clicked on libs selected to add it as a library. Now the gradle builds fine and everything works.
in "res" directory I create new "database" directory
That is not supported. You cannot invent new resource directories.
Please put the files in res/raw/
(and use via getResources().openRawResource()
) or assets/
(and use via getAssets().open()
).
I faced the same error when I created assets folder inside app/src/main/res/
We shouldn't create folders anywhere at our will.
To create new folders, make sure that you go to
File -> Folder and consequently ,choose one of the folders among the options displayed.
This way the IDE creates the folder at appropriate locations and thus accessing them doesn't raise any errors.