CS401 | sw engineering
  • outline
  • projects
  • syllabus
  • links

Exercise 10 -Android
due: April 2 start of class (pace yourself - finish part 1 March 26, then part 2 April 2), not recorded

INDIVIDUAL EXERCISE

Do this CODELAB

 

IMPORTANT::

Choose File->New Project->Basic Views Activity (not Basic Views)

 

ERROR FIXES:

NOTE: had to add the following to the gradle.properties file to get rid of some compile errors. While we are not using Kotlin directly some of the Java libraries are implemented in Kotlin now. (read error fix)


#see https://youtrack.jetbrains.com/issue/KT-54136/Duplicated-classes-cause-build-failure-if-a-dependency-to-kotlin-stdlib-specified-in-an-android-project
kotlin.stdlib.jdk.variants.substitution=false

AND had to add the following dependencies to the build.gradle (app) file (read this error fix)

//see https://www.concretepage.com/questions/746
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.8.22'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22'

so the build.gradle file looks like:


dependencies {

implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.navigation:navigation-fragment:2.7.6'
implementation 'androidx.navigation:navigation-ui:2.7.6'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
//see https://www.concretepage.com/questions/746
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.8.22'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22'
}

 

 

 

 

PART 1: beginning Android, The interface , do parts 1-7 of Codelab, due March 26 start of class

 

PART 2: more Andorid, Interactivity, complete the Codelab, due April 2 start of class

  • complete by April 2 Finish the beginning codeLab parts from Google to get started each person MUST have it setup and running on their own laptop and demonstrate it working
  • ALSO complete:
    • CodeLab on Debugging
    • Read about Junit Testing
    • (optional) Learn about JetPack Compose - toolkit for GUI - course

 

 

 

 

Deliverables

Demonstrate to fellow class mates during class ---if you did not succeed this is your SAFTEY check to get help from instructor --you WILL be required to do this work for your project.

If instructor asks for a report of who did and who did not complete in your group , please file this under Canvas assignments.

IIMPORTANT NOTE: You will not have the errors listed above if you choose to develop in Java please choose a new project using the "Empty Views Activity" template.

The CodeLab uses instead a "Basic Views Activity" as the template to start the project. That uses Jetpack Compose for its UI, and Jetpack Compose requires Kotlin. This is why those Kotlin Errors were introduced

cs401:sw engineering

  • home
  • outline
  • projects
  • syllabus
  • links