Package Name

This is the current version of the Donation app:

To continue using this project we need to 'refactor' it to Donation.2.0. At the time of writing, Android Studio's refactoring features and tools are a bit iffy :-) so we'll need to manually copy our project.

  1. Ensure you don't have Donation.1.5 open in Android Studio - if you do, close it now
  2. Navigate to the folder where you downloaded and unzipped Donation.1.5
  3. Rename (or copy if you wish) the folder to Donation.2.0
  4. Rename the file Donation.1.5.iml to Donation.2.0.iml
  5. Edit Donation.2.0.iml and change any references to Donation.1.5 to Donation.2.0
  6. Navigate to the .idea folder (it might be a hidden folder) open the .name file and rename the project name to Donation.2.0
  7. Launch Android Studio and open up the Donation.2.0 project

We should also take this opportunity to change the name of the 'ie.app' package to 'ie.app.activities', as we will be introducing other packages later on.

So create a new Package (in the 'main' folder)

and drag in your Donate.java into this new package. You can delete the empty package (if Android Studio hasn't done it already)

Do the same for the ApplicationTest class.

Next, check that the import statement in Donate.java is as follows:

import android.widget.Toast;

import ie.app.R;

public class Donate extends AppCompatActivity

So make sure your project structure looks like the above before continuing.

Also, don't forget to change the app_name string resource in your strings.xml.

You should 'Clean' your project at this stage "Build->Clean Project", and then Rebuild & finally run your app, to make sure everything is ok.

This is the current version of the Donation app (Your Starter Code for this lab, after you've completed the above):

results matching ""

    No results matching ""