Help required in setting up Android Studio

  • #1
1,832
1,689
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
    62.4 KB · Views: 406
  • Android Studio problem #2.JPG
    Android Studio problem #2.JPG
    67.5 KB · Views: 270

Answers and Replies

  • #2
1,406
408
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
1,832
1,689
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.
 
  • #4
1,406
408
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.
 
  • #5
1,832
1,689
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
1,406
408
I see, code could not reserve enough for the huge object space. Why the huge object?
 
  • #8
1,832
1,689
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
1,406
408
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.)
 
  • #12
1,832
1,689
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
1,406
408
You mention G: disk etc. Are you certain Android Studio plays well with that location. Try a folder on C:?
 
  • #14
1,832
1,689
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
1,832
1,689
  • #17
1,832
1,689
@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.
 
  • #18
1,406
408
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 Threads on Help required in setting up Android Studio

Replies
1
Views
2K
  • Last Post
Replies
4
Views
672
  • Last Post
Replies
4
Views
976
  • Last Post
Replies
22
Views
6K
Replies
16
Views
743
  • Last Post
Replies
5
Views
2K
  • Last Post
Replies
1
Views
3K
  • Last Post
Replies
10
Views
4K
Replies
57
Views
2K
  • Last Post
Replies
1
Views
2K
Top