(Solved) How do I copy the GeoQuiz project to do the challenges?


#1

The very first thing that you are asked to do is make a copy of geoquiz project. However there is no “import project” under file. Simply copying and renaming makes the entire project unusable:

Installation failed with message Failed to finalize session : INSTALL_FAILED_INVALID_APK: /data/app/vmdl679781462.tmp/1_slice_ package com.bignerdranch.android.geoquiz inconsistent with com.bignerdranch.android.geoquizchallenge._
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.

WARNING: Uninstalling will remove the application data!

Do you want to uninstall the existing application?

And having it try it’s solution doesn’t work. You flat out cannot copy and rename a project and expect it to work. It looks as though one would have to completely remake the project from scratch and copy in all the code and go from there. There don’t appear to be any real answers to this. Is this something no one else has a problem with?


#2

You see this kind of issue when you have an existing app installed with the same package name as a new app that you are trying to install, but there are differences between the two apps (for example, the signing key is different).

Usually, the fix for this means that you just need to uninstall the old app. It sounds like Android studio is failing to do that for you? Have you tried manually uninstalling the app from your device? If that doesn’t work, try cleaning your project (build -> clean project) and then running the code again.

Does that fix the problem? Let me know and I can help troubleshoot.


#3

No, none of that worked. What’s weird is that just copying it did work initially, but then for some reason it just stopped and none of the recommendations would fix it.

What I’ve ended up doing is moving to Git. I can keep the main project, and branch off for every challenge. This keeps the name and signing key the same without having to get the code mixed up.

So far this is working without any issues that I can see. Using Git through Android studio isn’t exactly intuitive but once setup it’s simply and easy.


#4

I’m having the same problem tried uninstalling app off phone and still getting errors will only run off the original version tried googling it with a few different methods I did not understand like configuring an external tool but did not see anything as simple as the book explained probably try some more googling unless someone here can shed some light


#5

Found a solution from another post on here lots more involved though from the books explanation