Help required in setting up Android Studio

In summary, the error is telling you that there is not enough space on your computer to build the project.
  • #1
Wrichik Basu
Science Advisor
Insights Author
Gold Member
2,118
2,692
This is the fifth time I am setting up Android Studio. I have downloaded the standalone zip for 32 bit computer from the official website. The android SDK is in G: drive, while the Android Studio files are in C:.

I have set up Android Studio, and set the SDK location to the required folder in G:. I have created a project with minSDK as API 15, and compileSDK and target SDK are both API 23. I have doneall this with instructions from this book: "The Busy Coder's Guide to Android Development" by Mark L. Murphy.

I am facing the same problem as the last time. It's saying that gradle build has finished with errors:

android studio problem.JPG

Android Studio problem #2.JPG


Can anyone please help me out?
 

Attachments

  • android studio problem.JPG
    android studio problem.JPG
    51.5 KB · Views: 544
  • Android Studio problem #2.JPG
    Android Studio problem #2.JPG
    52 KB · Views: 426
Technology news on Phys.org
  • #2
When a software package gives trouble I sometime switch packages. Have you tried the Atom editor with PlatformIO. Atom is a great general purpose coding editor. The PlatformIO (a free Atom package) has worked well programming my Uno. It's free and I've had good luck with it. It's also available on Mac OS and Linux.
 
  • #3
Paul Colby said:
When a software package gives trouble I sometime switch packages. Have you tried the Atom editor with PlatformIO. Atom is a great general purpose coding editor. The PlatformIO (a free Atom package) has worked well programming my Uno. It's free and I've had good luck with it. It's also available on Mac OS and Linux.
I would have happily tried out other platforms, but I can't. The reason is, the book I'm following, is like a tutorial, and after explaining topics, it asks the readers to try out the example codes. At the end of the book, one will have developed an application called EmPubLite. The IDE used throughout the book is Android Studio. Since I'm a first time learner, I want to follow the book strictly before playing with other IDEs.
 
  • Like
Likes BvU
  • #4
Wrichik Basu said:
I would have happily tried out other platforms, but I can't. The reason is, the book I'm following, is like a tutorial, and after explaining topics, it asks the readers to try out the example codes.

Yeah, I hate when that happens. The problem you face is parsing and understanding the error messages you are given. So, you have to debug either your setup, or the tutorial. Tutorials go stale with time because IDEs aren't static, they get "improved" as do the libraries for the device being programmed. If it's compiling with errors, my guess (and it's just a guess) are some libs are wrong versions or something. I'd need to see the error messages to even hope to help.
 
  • Like
Likes BvU
  • #5
Paul Colby said:
Yeah, I hate when that happens. The problem you face is parsing and understanding the error messages you are given. So, you have to debug either your setup, or the tutorial. Tutorials go stale with time because IDEs aren't static, they get "improved" as do the libraries for the device being programmed. If it's compiling with errors, my guess (and it's just a guess) are some libs are wrong versions or something. I'd need to see the error messages to even hope to help.
I didn't even write a line of code. I created the project, and from that time, it's showing that there was an error in building the project, while the book says that it should compile properly.

I can provide the error messages if you tell me how to find them.
 
  • #6
I see, code could not reserve enough for the huge object space. Why the huge object?
 
  • #7
So, if you didn't write any code, what is being compiled?
 
  • #8
Paul Colby said:
So, if you didn't write any code, what is being compiled?
There is some code that is written by default when a project is made. Was I wrong to compile that code?
 
  • #9
Wrichik Basu said:
There is some code that is written by default when a project is made. Was I wrong to compile that code?
There is no wrong, there is only working or not working. Looking at the code the include *.jar line looks like it could load a pot load of stuff. Is your file tree too big. (Warning I hate windows and don't use it and have never touched an android device, ever.)
 
  • #10
Okay, maybe your library include file path isn't setup right?
 
  • #11
Paul Colby said:
Okay, maybe your library include file path isn't setup right?
I think so. I just found this:



Let me see if that works.
 
  • #12
Nope. It is not working.

I'm getting this error:

Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/4.7/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 1048576KB object heap
 
  • #13
You mention G: disk etc. Are you certain Android Studio plays well with that location. Try a folder on C:?
 
  • #14
Paul Colby said:
You mention G: disk etc. Are you certain Android Studio plays well with that location. Try a folder on C:?
It's not a problem with the SDK. The problem is with the gradle, and that is present in the folder of Android Studio in C: drive. Somehow the IDE is unable to sync with the gradle, even though necessities like Internet are available throughout the process. Command prompt can access the gradle properly too.
 
  • #16
Paul Colby said:
https://stackoverflow.com/questions/19932793/syncing-android-studio-project-with-gradle-files

The third answer merely chose (highlighted) a different directory in the tree to get it to work. This is why I hate IDEs. A) it's like talking to space aliens and B) one is shielded from understanding the process. I've about exhausted what I can do on this one.
I'll try tomorrow and see if that works.

Anyways, you've helped a lot, and thanks for that. :smile:
 
  • #17
@Paul Colby wanted to let you know that the problem has been solved. The actual problem lay with the JDK, because the IDE was trying to work with a deprecated one. Gradle build could finally start properly.
 
  • Like
Likes Paul Colby
  • #18
Kind of surprised (and not) that the IDE couldn't check the java version and politely inform you that it's out of date. Glad you got it working.
 
  • Like
Likes Wrichik Basu

Related to Help required in setting up Android Studio

1. Why do I need help setting up Android Studio?

Setting up Android Studio can be a complex and time-consuming process, especially for those who are new to programming or unfamiliar with the Android development environment. It is helpful to have someone guide you through the setup process to ensure that everything is done correctly.

2. What are the system requirements for installing Android Studio?

The system requirements for Android Studio include a 64-bit operating system (Windows, Mac, or Linux), at least 4GB of RAM, and 2GB of available disk space. It is also recommended to have a high-speed internet connection for downloading necessary files and updates.

3. How do I download and install Android Studio?

To download and install Android Studio, go to the official Android Studio website and click on the "Download Android Studio" button. Follow the prompts to complete the download and installation process. Once installed, you can launch Android Studio and begin setting up your development environment.

4. What are the essential components for Android Studio setup?

The essential components for Android Studio setup include the Android SDK, which contains the necessary tools to build and test your Android app, and the Android Virtual Device (AVD) Manager, which allows you to create and manage virtual devices for testing your app on different versions of Android.

5. Are there any tutorials or resources available for help with Android Studio setup?

Yes, there are many tutorials and resources available online to help with Android Studio setup. The official Android Studio website offers a step-by-step guide for setting up the development environment, and there are also many helpful videos and articles from experienced developers that can provide additional guidance and tips.

Similar threads

  • Programming and Computer Science
Replies
1
Views
2K
  • Programming and Computer Science
Replies
3
Views
669
  • Programming and Computer Science
Replies
4
Views
2K
  • Computing and Technology
Replies
5
Views
2K
  • Programming and Computer Science
Replies
16
Views
1K
  • Programming and Computer Science
Replies
1
Views
364
  • Programming and Computer Science
Replies
5
Views
2K
Replies
2
Views
960
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • Programming and Computer Science
Replies
8
Views
3K
Back
Top