How can I add an image in the drawable/res folder?

4.7k views Asked by At

I tried to copy and paste .jpg file to the drawable folder but i got this errors:

E:\Projects\QuizApp\MyApplication\app\build\generated\source\r\debug\com\example\androbo\quizapp\R.java

Error:(1452, 32) error: <identifier> expected
Error:(1452, 37) error: illegal start of type
Error:(1452, 38) error: <identifier> expected
Error:(1453, 32) error: <identifier> expected
Error:(1453, 40) error: <identifier> expected
Error:(1454, 32) error: <identifier> expected
Error:(1454, 37) error: illegal start of type
Error:(1454, 38) error: <identifier> expected
Error:(1455, 32) error: <identifier> expected 
Error:(1455, 39) error: <identifier> expected
Error:(1456, 32) error: <identifier> expected
Error:(1456, 37) error: illegal start of type
Error:(1456, 38) error: <identifier> expected
Error:(1457, 32) error: <identifier> expected
Error:(1457, 40) error: <identifier> expected
Error:(1458, 32) error: <identifier> expected
Error:(1458, 37) error: illegal start of type
Error:(1458, 38) error: <identifier> expected
Error:(1459, 32) error: <identifier> expected
Error:(1459, 40) error: <identifier> expected
Error:Execution failed for task ':app:compileDebugJava'.

Compilation failed; see the compiler error output for details.

I didn't put any code yet...
1

There are 1 answers

0
j1rjacob On BEST ANSWER

I just figured out what is the problem.

I added 2003.jpg, 2005.jpg and so on...

The Android does not allow it so I rename the file to button2003.jpg and it works.

Actually I am following a tutorial at http://code.tutsplus.com/tutorials/android-ui-workshop-build-an-interactive-quiz-app--mobile-14208

then I download the the images files and instantly paste it on the res/drawable so I get this errors above.

Anyway thanks for the past reply guys I appreciate it.