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 trial

Android Android Data Persistence Introduction to Data Persistence Introduction to the Starter Kit

Tomas Öberg
Tomas Öberg
4,100 Points

Why isn't the project file being updated?!

I've tried a lot of the suggestions here below from other users but nothing seems to work.

Harry James
Harry James
14,780 Points

Hey Tomas!

What is the issue you're having when you try to use the project files? I'll try my best to help you out :)

8 Answers

I'm posting this link in case people want to try this project. It is a rebuild of the Treehouse Meme maker (Android Data Persistence) Starter Kit.

I rebuilt it because the old one wouldn't build, due to two sections that needed to be replaced in the gradle files, but now the main UI, action Bar with Tabs has also been deprecated.

My new kit uses the Toolbar and sliding tabs, rather than the action bar and tabs.

I did the work on my xubuntu 14.04 development machine which is running java version "1.8.0_66" and Android studio 1.4. It runs a-ok on an HTC EVO 3d(android ics, api 14) and also Samsung Gs3 and LG Sunrise(android KitKat 4.4.2 api 19).

https://github.com/suedinym/TreehouseMemeMakerStarterKit

Matthew Barrus
Matthew Barrus
16,731 Points

Thanks, Susan. This saved me a lot of headache. Had to go through this same process to rebuild the Ribbit app!

Just wanted to point out, in case anyone else steals your code and runs into this, that the manifest file is missing the "name" in the <application> tag. Without this, the "MemeMakerApplication.java" was not getting invoked and so the file assets were not being saved into internal storage. So just add: android:name=".MemeMakerApplication" as an attribute to the <application> tag in AndroidManifest.xml

Matthew Barrus - Thanks. I added it to the project and pushed it to GitHub.

Sexual Potatoes
Sexual Potatoes
12,051 Points

Thanks, Susan. Treehouse should pay attention to its community and put your project up instead of theirs.

Harry James
Harry James
14,780 Points

Hey Tomas!

Welcome to Android! It's very inviting! Haha.

Yes, you often do get issues like these when importing somebody else's project and it's a right hassle to fix all of the incompatibilities between your version and theirs.

It is possible though! For the error with gradle, it's because runProguard is now deprecated and has been replaced with minifyEnabled. Therefore, in your build.gradle file, you should swap out runProguard for minifyEnabled.

After that, try a Gradle sync again and see if the problem goes away.


Let me know how it goes and if you get any more errors after this, post them here and I'll be happy to help you out :)

Tomas Öberg
Tomas Öberg
4,100 Points

Yes, finally! Thanks a lot man! :)

Harry James
Harry James
14,780 Points

Woohoo! Glad you got it sorted :)

If you ever get into any other problems along the way, feel free to tag me with @Harry James and I'd be happy to help out ;)

Tomas Öberg
Tomas Öberg
4,100 Points

I started over completely:

The compiler begins by telling me: "failed to find target android-19..." So I install the missing components. Then it says:"failed to find target android-20..." So I install the missing components.

Then: "The project is using an unsupported version of the Android Gradle plugin-(0.12.2) the recommended is 1.2.3" So I click "Fix plug-in version and sync project" and then "Load file system changes"

Then: "Failed to sync Gradle project 'mememaker Unknown host 'repo1.maven.org: unknown error'" So I press enable gradle 'offline mode'

After that I'm stuck with: Error: no cached version listing for com.android.tools.build.gradle:0.12+available for offline mode

So I try to change build.gradle to the latest recommended: "classpath 'com.android.tools.build:gradle:1.2.3'"

Then I'm stuck with:

Error:(15, 0) Gradle DSL method not found: 'runProguard()' Possible causes:The project 'mememaker' may be using a version of Gradle that does not contain the method.

  • The build file may be missing a Gradle plugin.
  • Apply Gradle plugin

And don't have a clue what is going on. It just doesn't seem compatible.

Tomas Öberg
Tomas Öberg
4,100 Points

Thanks!

How? Do you mean these two lines? runProguard is already set to false:

    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
Harry James
Harry James
14,780 Points

Hey again!

You'll want it to be like this:

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

and then the error should go away :) (I changed the runProguard line to minifyEnabled)

Tomas Öberg
Tomas Öberg
4,100 Points

Great! I appreciate that :)

Sungjin Jun
Sungjin Jun
2,977 Points

Thanks, this helped me too :)