Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README so build instructions are current and complete #112

Closed
julianharty opened this issue Apr 26, 2017 · 17 comments
Closed

Update README so build instructions are current and complete #112

julianharty opened this issue Apr 26, 2017 · 17 comments
Assignees
Labels
Milestone

Comments

@julianharty
Copy link
Contributor

The current contents of the README are out of date. They describe how the app used to be build before being migrated to this repo (kiwix-android). I think the build is now simpler. Let's revise the README accordingly.

I'm basing my assessment on the travis config https://github.com/kiwix/kiwix-android/blob/master/.travis.yml

I'll update these notes with the build steps I take to build the main kiwix app & can then I/we can revise the README.

@julianharty julianharty self-assigned this Apr 26, 2017
@julianharty
Copy link
Contributor Author

Note: ./gradlew build needs to know where Android tools are.

* What went wrong:
A problem occurred configuring project ':app'.
> SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

Let's document this expectation & perhaps suggest how people can address it.

@julianharty
Copy link
Contributor Author

export ANDROID_HOME=/Users/julianharty/Library/Android/sdk

Julians-MacBook-Pro:kiwix-android julianharty$ ./gradlew build
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory.  It is currently set to /Users/julianharty/Library/Android/sdk/ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

Do we need the NDK to build the app?

@mhutti1
Copy link
Contributor

mhutti1 commented Apr 26, 2017

@julianharty no, I am pretty certain not. (Although I think you do if you are building from sources as is done in kiwix-build)

@mhutti1
Copy link
Contributor

mhutti1 commented Apr 26, 2017

At the moment we use an old version of kiwix-lib at some point we need to look at importing the newest version automatically with gradle. I think the build should be possible just with ./gradle build if the android sdk is set. You can avoid this by importing into android studio and this will step you through this process.

@julianharty
Copy link
Contributor Author

BUILD SUCCESSFUL

@julianharty
Copy link
Contributor Author

From the vast set of tasks listed by ./gradlew tasks I'd appreciate guidance on which targets to use when. I've read the task descriptions and they're too similar for me to guess which ones would run the Espresso tests, which one(s) would deploy a debug build of standard Kiwix on my device, etc.

@mhutti1
Copy link
Contributor

mhutti1 commented Apr 26, 2017

Yeah that sounds like a good idea, basic rundown.the first word is the command:

  • compile - Build an apk

  • install/uninstall - As named

  • connected - runs instrumentation (espresso) tests

  • test - Runs unit tests

Some commands depend on others. I.e connected will compile if it needs too.

The next words specify what flavour/build variant to use.

The standard is KiwixDebug

You join an action word with a build variant to get the full command.

@mhutti1 mhutti1 self-assigned this Aug 17, 2017
@mhutti1 mhutti1 mentioned this issue Mar 7, 2018
@reeshabhranjan
Copy link

I am getting the same error while building the app. Kindly provide details on how to solve this. I have tried some suggestions from the answers on this StackOverflow question. But they are not working.

@abdulwd
Copy link
Contributor

abdulwd commented Mar 5, 2019

@reeshabhkumarranjan Please try this #974 (comment).

@reeshabhranjan
Copy link

reeshabhranjan commented Mar 5, 2019

@abdulwd Your comment seems promising. I am cloning the whole project again. The cloning of this project takes a lot of time, I don't know why. Will update you on this soon.

@reeshabhranjan
Copy link

reeshabhranjan commented Mar 6, 2019

@abdulwd I tried your fix, but it didn't work. I got these warnings:

WARNING: The option setting 'android.jetifier.blacklist=byte-buddy,adapter-rxjava2,converter-simplexml,logging-interceptor,mockwebserver,error_prone_annotations,guava' is experimental and unsupported.
Affected Modules: app, kiwixlib

And this:

WARNING: BuildType(local_download_server): buildConfigField 'KIWIX_DOWNLOAD_URL' value is being replaced: "http://download.kiwix.org/" -> "http://kiwix-download-server/"
Affected Modules: app

Also, the "Run" button is greyed out.
image

This is the event log:

6/3/19
1:43 PM	The IDE ignores SIGINT: the "Stop" button in run configurations may not work.
					Details Don't Show Again

1:45 PM	Frameworks Detected
					Android framework is detected.
					Configure

2:06 PM	* daemon not running; starting now at tcp:5037

2:06 PM	* daemon started successfully

@abdulwd
Copy link
Contributor

abdulwd commented Mar 6, 2019

Have you deleted the .idea folder before importing the project again? Also select kiwixDebug as the build variant.

@reeshabhranjan
Copy link

Finally. Selecting kiwixDebug as build variant fixed the issue. This instruction should be in the README.md!

@abdulwd
Copy link
Contributor

abdulwd commented Mar 7, 2019

@reeshabhkumarranjan You can open a PR for that.

@mhutti1
Copy link
Contributor

mhutti1 commented Mar 10, 2019

@reeshabhkumarranjan It is and is in bold:

We utilize different build variants (flavours) to build various different versions of our app. Ensure your build variant is kiwixDebug to build the standard app.

@kelson42
Copy link
Collaborator

I think this ticket could be closed and has been supperseeded by #1200

@kelson42 kelson42 added this to the 3.0 milestone Jun 18, 2019
@macgills
Copy link
Contributor

I think we provide sufficient information, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants