Saving Data on Android - Part 2: The Starter App | Ray Wenderlich

Download the starter app, build it in Android Studio, and review the existing app code. Review the Model-View-Presenter (MVP) and Repository patterns.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4561-saving-data-on-android/lessons/2

I can’t run the project

Hi @abosala7. What types of errors are you seeing?

What version of Android Studio are you running? Be sure to accept any prompts from Android Studio to update the Android Studio Gradle plugin. Also, be sure to open the root project folder when opening the project. Thanks!

Hi macsimus

I was facing 2 problems
1- I am using mac terminal (that was different from direct vim command so i should click “i” for insert the “:w” for save )when I am creating keystore.properties …

2- when I am building the project I am getting (read timed out error) and after search I get the answer (which to remove support repository and install it again)
good to know I am using 3.3.2 android studio and the problem has been solved …

thanks for your interest .

@abosala7 Really glad you fixed it! :]

hello there is a file missing when we try to run your demo project. keystore.properties. how do we fix this please?

@macsimus Can you please help with this when you get a chance? Thank you - much appreciated! :]

Hi @nicolas.zein thanks for the question! At about the 2:40 mark in the video, I show you the process of using a text editor to create the keystore.properties file, in which you add

GOOGLE_MAPS_API_KEY="your-api-key"

You can use any text editor to create the file. In my case, I used vim.

I hope this helps and thanks again for the question!

1 Like

Hello,
is started but Screenshot by Lightshot
no errors, no warnings

implementation “org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61”
implementation ‘androidx.appcompat:appcompat:1.1.0’
implementation “com.google.android.material:material:1.1.0”
implementation ‘com.google.android.gms:play-services-maps:17.0.0’
implementation ‘com.android.support.constraint:constraint-layout:1.1.3’
testImplementation ‘junit:junit:4.13’
androidTestImplementation ‘com.android.support.test:runner:1.0.2’
androidTestImplementation ‘com.android.support.test.espresso:espresso-core:3.0.2’

ps
i did it.

@macsimus Can you please help with this when you get a chance? Thank you - much appreciated! :]

Hi macsimus
Ive created a txt file on my Mac and added the GOOGLE_MAPS_API_KEY=" " placed it in
Users/rayderose/Downloads/1-002-the-starter-app/start/keystore.properties

im still getting this error

ERROR: /Users/rayderose/Downloads/1-002-the-starter-app/start/keystore.properties (No such file or directory)

What am I missing please?

Thanks for the question, @raimondoderose!

My first thought is something I mentioned at around 2:56 of this episode, if you download the starter project for a different episode, you’ll need to copy in the keystore.properties file into the newly downloaded project. Is it possible that happened here?

Hi @macsimus,thank you for your timely response.
Im not sure I follow your answer,

Let me try and clarify - the keystore.properties file was created after downloading your starter android project and added to the project but for some reason when the project builds it can’t find it

Ok thanks @raimondoderose!

I just now tried downloading the sample project for the 1-002 episode. I created the keystore.properties file, opened the project in Android Studio 3.6, and the project built and ran successfully on an emulator.

A couple of things you could try here:

  1. If Android Studio prompts you to upgrade the “Android Gradle Plugin” for this project, say No that if you have previously said Yes. You may need to re-unzip the starter project and go through the steps again to test this way.
  2. If that is not the issue, you could zip up your start folder and attach it here and I will see if I can build it. But first be sure to remove your GOOGLE_MAPS_API_KEY value from the keystore.properties file, and I will insert my own instead.

Other than those options, I’m not sure why you’d be seeing that error.

ok thanks will try that now @macsimus

@macsimus Cool redoing all the steps from scratch has worked !!
Thanks you have restored my faith again…
May the force be with you…

And with you! Glad to hear it, @raimondoderose!