sanamionline
Aspiring developer
Profile
Posts: 61
Reg: Jul 22, 2012
Yulin, Guangxi
3,510
12/09/12 06:49 AM (13 years ago)

Error when compiling source code

Thanks for your kind help. When I imported the source code I didn't have any errors just 2 warning posted below so I went to Run as Android Application and then got this error: Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder! LearningHerbs Unknown Android Packaging Problem Warnings: The import android.support.v4.app.NavUtils is never used MainActivity.java /LearningHerbs/src/com/example/learningherbs line 7 Java Problem The import android.view.MenuItem is never used MainActivity.java /LearningHerbs/src/com/example/learningherbs line 6 Java Problem
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
12/09/12 07:45 AM (13 years ago)
99.9% of the time warnings don't matter, eclipse is just telling you that those imports aren't used. Do you have the right api's installed in the sdk manager? If so, are you building to the right api level? Right click project > Properties > Android and make sure a google api above level 8 is selected. I usually just set it to api level 16. Make sure your works's saved, highlight your project and select the project tab along the top of eclipse and do a clean. Try running emulator again if the project appears to be free of errors.
 
sanamionline
Aspiring developer
Profile
Posts: 61
Reg: Jul 22, 2012
Yulin, Guangxi
3,510
like
12/10/12 05:33 AM (13 years ago)
I forgot to mention the last time I had Android 2.2 api 8 selected then I switched it to google 2.2 api 8 then I got the error.e I did a clean and than ran the emulator again but couldn't because of the error.
 
sanamionline
Aspiring developer
Profile
Posts: 61
Reg: Jul 22, 2012
Yulin, Guangxi
3,510
like
12/10/12 05:36 AM (13 years ago)
I just switched back to android 2.2 api 8 but still the same error.
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
12/10/12 08:13 AM (13 years ago)
Hard to know what's going on without seeing the project. Send it over if you like? paul9qr (at) btinternet (dot) com
 
sanamionline
Aspiring developer
Profile
Posts: 61
Reg: Jul 22, 2012
Yulin, Guangxi
3,510
like
12/11/12 01:59 AM (13 years ago)
Thanks I just sent you the code Ben
 
sanamionline
Aspiring developer
Profile
Posts: 61
Reg: Jul 22, 2012
Yulin, Guangxi
3,510
like
12/15/12 07:12 PM (13 years ago)
I think there is definitely something wrong with that splash screen. I took it out and it worked. I also upgraded to 4.2 google api 17
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
12/15/12 07:24 PM (13 years ago)
Like I said when I removed the splashscreen json data from your project and it worked. There are quite a lot of posts about splashscreen problems, it doesn't look to be fixed.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.