Frequently Asked Questions
FAQs
This page contains tip and solutions to common problems students experience in Android development
-
How do I create a Java project in Android Studio?
- Run Android Studio and create a new project (File -> New -> New Project).
The default options should be sufficient. This will create a new project with a single module named "app".
The "app" module is, of course, an Android app. For a non-Android project, this module is not needed, but having it there doesn't hurt anything either.
- Within the new project create a new module (File -> New -> New Module). For the module type select "Java Library".
This new module will contain the non-Android code for the project, and should be named accordingly. (For example,
if you were developing the Family Map Server, you might call this module "server".)
- Android Studio should have created a class in the new module named "MyClass" or whatever you named it. Add a main method to this class.
- To run the new main method, in the tree view on the left, navigate to the new class (e.g., "MyClass"), right-click on it,
and select either "Run MyClass.main" or "Debug MyClass.main" to either run or debug the program.
How do I receive TA help?
- Go here to get in the queue.
- For a full list of policies go here.
- If you are asking for clarification, please read the specifications in full before asking for help.
- If you are asking for help in debugging you must do each the following: Spend at least 30 min. working on your own, Google the question, READ YOUR BOOK.
- Also, if they are in the labs other than during their posted hours, they're doing homework for other classes.
- Remember one purpose of this class is for you to learn how to learn. If we feel you are not putting forth your full effort or for any other reason we may ask you to return later when you ave fulfilled these requirements.
-
How do I pass off the first three labs?
- We will be running a test driver from the TA machines, in order to do this we will need to know the file path to the source files from your home directory on the lab machines.
- We recommend copying all .java files you have created into a temporary folder in your home directory on the lab machines.
- Make a note of the file path then enter the queue for pass off.
- Remember any changes you make to your code will not affect the code in the temporary file so you will need to re-copy them over.
-
My URL looks right, but it says I can't connect to the server. Fix it? Please. #thankyou
- Make sure your serve is running
- Make sure your
AndroidManifest.xml
to allow access to the internet (see here)
- Make sure you device is on the same network as the computer running the server. We find it works best if both machines are on the CS dept. WiFi. This is what the lab machines run on.
- The server gives several options for IP addresses; try different ones if it is still not working.
-
How do I use Google Maps with Android Studio?
- Google itself has a great tutorial here.
- We recommend that you create a new project to follow the tutorial then apply it to your own code.
- To create the Google maps activity we recommend you use New-> Activity-> Gallery-> Google Maps Activity. This will update the Android manifest and generate an XML for you.
- Follow the instructions in the generated XML and android manifest as to how to add the app to the registry.
- If you are on campus we find it works best if you are connected to the CS dept. WiFi.
-
How do I use Amazon Maps with Android Studio?