0

I am new to android. Using android studio when i try to run "Hello world", I get below error.Can anyone kindly help on this?

java.io.FileNotFoundException: .....\MyFirstApp\app\build\intermediates\dex\debug \classes.dex (Access is denied)

Provided classes.dex is available in the expected path.

1 Answers1

0

The build path it not exist, so you can change it
1. Open Project structure (F4 on one of the modules in the project explorer)
2. Click on Project tab on the left
3. Define "Project compiler output:" as YOUR_PROJECT_PATH\out (or any folder you want)
update for new android studio" You can use menu RUN -> Edit Configuration -> Select "default" element/ Application -> then change working directory

thienkhoi tran
  • 341
  • 2
  • 9
  • But i couldn't see "project compiler output" option in "Project Structure" . could you please suggest on this. – Keerthana Rajasekaran Apr 16 '15 at 06:45
  • You can use menu RUN -> Edit Configuration -> Select "default" element/ Application -> then change working directory – thienkhoi tran Apr 16 '15 at 07:01
  • I don't really get your point. Why do i need to change working directory? It's currently in hello world. – Keerthana Rajasekaran Apr 16 '15 at 07:36
  • I think the config of this app does not match you PC. This issue often occurs when download source code from other. For Ex: I share a source code, that was reconfigured to run as my PC on "F:\projects\" but when you download, your computer does not have F driver, so you have to change the output folder. I means "You should change the output folder" – thienkhoi tran Apr 16 '15 at 07:42
  • I agree.But here I haven't downloaded it from anywhere.I have just created a "Hello world". And i am failing to run it. – Keerthana Rajasekaran Apr 16 '15 at 07:50
  • Please try this topic to build signed APK, may It will work http://stackoverflow.com/questions/16622843/how-do-i-export-a-project-in-the-android-studio – thienkhoi tran Apr 16 '15 at 08:04