Learning android studioΒΆ
The order of making a android appΒΆ
1. LayoutΒΆ
When you've created a project you need to make the layout of the app. This is done in the res/layout/activity_main.xml
file. This file is a xml file that describes the layout of the app. If the folder doesnt exist you can create it by right clicking on the res
folder and selecting New -> Android Resource File
. There you can add qualifiers to the file. Qualifiers are used to specify what kind of properties its has.
2. Variables for the layoutΒΆ
When you're dragging and droppign things in you can add a recource name to the object. This is used to reference the object in the code. You can add a recource name by clicking on the object and then going to the Attributes
tab. There you can add a recource name. That recource name is then used to reference the object in the code.
3. CodeΒΆ
After you made the layout you can start writing code in the MainActivity.java
file. This file is located in the java/com.example.myfirstapp
folder. This file is the main file of the app and is the file that is run when the app is started.
4. PermissionsΒΆ
If you want to use a certain permission in your app you need to add the permission to the AndroidManifest.xml
file. This file is located in the app
folder. You can add a permission like this:
1 |
|
Issues with setting up android studioΒΆ
We had some issues with setting up android studio. Here is a list of problem. * Gradle not building the application * This was fixed for some by wiping their entire gradle folder and then rebuilding the folder. * Peppersdk not working on the current version of android studio * This was fixed by downgrading the version of android studio to 3.4.2
SourcesΒΆ
-
Android studio guides
- https://developer.android.com/codelabs/build-your-first-android-app
- https://www.jetbrains.com/help/idea/create-your-first-android-application.html#yivskh_3
-
Permission list
- https://gist.githubusercontent.com/Arinerron/1bcaadc7b1cbeae77de0263f4e15156f/raw/6c577d9f425340a7dcd1ec5efc7a12c054d6623f/xml_permissions.txt