Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: John Doe Newsgroups: comp.lang.java.programmer Subject: Re: Android Studio built-in samples okay but imports don't work Date: Tue, 21 Oct 2014 20:23:08 +0000 (UTC) Organization: A noiseless patient Spider Lines: 35 Message-ID: References: Injection-Date: Tue, 21 Oct 2014 20:23:08 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="fc32ca8a1c0a511aba96be8caa02b8f6"; logging-data="17100"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+3yOE7zRpxc9fVyALZevO0RR5Avs8rpXk=" User-Agent: Xnews/2006.08.05 Cancel-Lock: sha1:hd9ZGfN0SJWwnAKnvEI2ninP+E8= Xref: csiph.com comp.lang.java.programmer:30149 This is the original... https://github.com/gdg-hudson-valley/android-samples We imported and built Android Developers Samples to run on Android Studio (currently at v0.8.9). Doing this required the following changes after the relevant's project zipfile was downloaded from its specific page on the samples site. First, in the build.gradle file, change classpath to'com.android.tools.build:gradle:0.12.2' change buildToolsVersion to "20.0.0" change plugin to 'com.android.application' (from 'android') change 'com.android.support:' dependencies to remove "+" versions (replace with 20.0.0) Next, import the project into Android Studio (File->Import Project) rebuild it (automatically, or manually using Project->Rebuild). if build errors occur, try 'File->Invalidate Caches/Restart', then rebuild Finally, verify project build by running the application in an emulator, or on a connected Android Device. Optionally, Set ".gitignore" to prevent compile/build/IDE artifacts being stored needlessly in version control. For reference: This repo uses a .gitignore file based on this StackOverflow post.