Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJonathan Grieve
Treehouse Moderator 91,253 PointsWorking with Android 3.0 Beta 7 and Android 2.3.3
Phew! I've devoted a lot of time (and download bandwidth) to updating my copies of Android Studio so I can work on Kotlin more. This was after I ran into some coding issues with the Kotlin version of the fun facts app when I was getting back into the Basic programming part of the course.
I haven't tested it yet, but I think I should be ready to continue that now.
But now I'm wondering what to do with my copy of Android 2.3.3. My suspicion is that I need to keep it on my computers as maybe a way to test backward compatibility. But since I've also updated the SDK's and Tools on my Laptop and PC I'm finding that 2.3.3 has become unusable for my other apps, (i.e. those coded in Java).
I think it's because Gradle is looking for files linked to Android 3.0 and I'm attempting to sync in the wrong version. Which makes things tricky if I needed to go back to the previous version for whatever reason.
Should I just continue with 3.0 Beta going forward or am I going down a complicated road trying to keep both (and more) versions up to date?
Hope this all makes sense :)
2 Answers
Ben Deitch
Treehouse TeacherI'd continue with 3.0 going forward, but there shouldn't be any issues with having 2.3 as well. What's it tell you the error is? I'd guess you just need to update a gradle version in either 'gradle-wrapper.properties' or the project's 'build.gradle' file. Try making a new project, and if the new project compiles, use it to check your gradle files.
Steve Hunter
57,712 PointsHi Jonathan,
It sounds like the newer version is overriding your general settings. I don't know if you can have two profiles for Android Studio.
What you can do is install a virtual machine like VirtualBox and install the older Studio version on there.
I've got various virtual boxes for development work and penetration testing - they work really well. Alternatively, set up a dual boot with a Linux partition and put the older version on there. That can be fiddly - the VM is far easier!
Steve.
Jonathan Grieve
Treehouse Moderator 91,253 PointsIt shouldn't be doing that, I don't think. When I install a new version I ask it to import the settings from the previous version so I think it's just a case of gradle updating when I installed the newer version of the tools. :-)
If I'm brave enough, I might try and go back through the version control and see if I can get a copy of the old gradle file and see if that fixes it.
Failing that, I'll try the VirtualBox method and research what that would involve. :)
Steve Hunter
57,712 PointsVirtualBox is dead easy. Install a Linux image to it 'cos they're free - try Kali Linux 'cos it's cool comes with all the pen testing tools.
Or pick a sensible distro like Fedora. Then install Studio and you're good to go! You can export out of the virtual environment with USB or just link up to your Dropbox or OneDrive.
If you have problems, give me a shout.
Steve Hunter
57,712 PointsSteve Hunter
57,712 PointsKnowledgeable, sensible advice getting in the way of installing new fun things. Sheesh!
Jonathan Grieve
Treehouse Moderator 91,253 PointsJonathan Grieve
Treehouse Moderator 91,253 PointsI promise Iβll research Virtual Box at the very least :)
But yes, Ben I think this is exactly whatβs happening, although I canβt remember the exact error.
What Iβve done is version controlled my regular projects knowing that they were all going to error. I guess I didnβt think through properly that it would cause the project to fail in 2.3. Iβll check this out and post back.
Just one more question. I have 4 versions of AS on each of my systems. How much is overkill?
Ben Deitch
Treehouse TeacherBen Deitch
Treehouse TeacherYou should really only have 1 or 2; the stable version for developing, and the canary/beta version if you want to be ahead of the curve or try out some new IDE feature. It's certainly not an issue to have more, but I can't think of any advantages.
Jonathan Grieve
Treehouse Moderator 91,253 PointsJonathan Grieve
Treehouse Moderator 91,253 PointsBrilliant, this clears up everything! Thanks for your help :)