简体   繁体   中英

Downloading Full Sample Apps for Android to Analyze

I've been trying to get a sample app off of http://f-droid.org/repository/browse/ for some time. I just want to test the app to see how it works and understand it better. Every time I try to download one though, I click on "source code" and get a screen that looks similar to BitBucket (which I don't know how to download from) or I get a Command Prompt command that gets me the correct code, but the code won't run for one reason or another regarding R.java problems.

The code on the site is supposed to work already so I'm guessing its something I'm doing. I'm just copying the files into my IDE (Motodev Studio) and cleaning the project once I've tried to get rid of what seem like trivial errors. However, when I finish messing with it, the IDE states that R.java cannot be resolved. I know the question as to why that is the case has been asked many times on this site already so I'm just going to assume that the error is with me and not with the IDE. Is there a special way to get these full samples down from the site? Is there a site that is easier to get full samples off of? Please help!

You do not mention anything about the sample app you are trying to download and compiler/run. Picking a random example from the page called Abstract Art , there is a Source Code link which takes you to the code repository. From the code repository (In this case Github), you can download a zipped folder with the source code. Unzip and import into your IDE. Motodev Studio should have tutorials that will help you import the code you downloaded and compile.

You are going to need to learn about source control as the various apps on that site either are using git or subversion or mercurial. Each of those version control systems have numerous tutorials so its worth your while to learn about it.

Alternatively download and untar the 'tarball' on each page which should have the source.

After downloading tar.gz file

  • untar/unzip the file
  • In eclipse

    File - > Import-> Existing Projects into workspace -> give the path and click browse and then click finish

  • A folder with project name will be crated in your workspace.

  • check the project properties by right click on the project and set target for the project
  • some error will arise due to @override . so remove it
  • Run the project

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM