Help required in setting up Android Studio

  • #1
1,331
1,144

Main Question or Discussion Point

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

Answers and Replies

  • #2
Paul Colby
Gold Member
1,034
230
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,331
1,144
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
Reactions: BvU
  • #4
Paul Colby
Gold Member
1,034
230
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
Reactions: BvU
  • #5
1,331
1,144
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
Paul Colby
Gold Member
1,034
230
I see, code could not reserve enough for the huge object space. Why the huge object?
 
  • #7
Paul Colby
Gold Member
1,034
230
So, if you didn't write any code, what is being compiled?
 
  • #8
1,331
1,144
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
Paul Colby
Gold Member
1,034
230
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
Paul Colby
Gold Member
1,034
230
Okay, maybe your library include file path isn't setup right?
 
  • #11
1,331
1,144
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
1,331
1,144
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
Paul Colby
Gold Member
1,034
230
You mention G: disk etc. Are you certain Android Studio plays well with that location. Try a folder on C:?
 
  • #14
1,331
1,144
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.
 
  • #15
Paul Colby
Gold Member
1,034
230
  • Like
Reactions: BvU
  • #16
1,331
1,144
  • #17
1,331
1,144
@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
Paul Colby
Gold Member
1,034
230
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.
 

Related Threads on Help required in setting up Android Studio

  • Last Post
Replies
4
Views
402
  • Last Post
Replies
4
Views
694
Replies
1
Views
1K
  • Last Post
Replies
22
Views
6K
  • Last Post
Replies
10
Views
3K
  • Last Post
Replies
7
Views
25K
  • Last Post
Replies
1
Views
3K
  • Last Post
Replies
5
Views
2K
Replies
2
Views
3K
Replies
1
Views
3K
Top