ge0rg / aprsdroid

APRSdroid - Geo-Location for Radio Amateurs
https://aprsdroid.org/
GNU General Public License v2.0
508 stars 98 forks source link

Unable to compile using instructions on Developer page #225

Open nathanchilton opened 5 years ago

nathanchilton commented 5 years ago

The instructions for building aprsdroid, shown on on https://github.com/ge0rg/aprsdroid/wiki/Developer, are out of date.

The android update project -p . command has been deprecated and is no longer available. Would you please provide current instructions for building this project? I would like to help out with the project, but I can't actually build it.

ge0rg commented 5 years ago

Sorry you haven't heard back from me immediately. The project is still relying on old versions of ant, scala and Android SDK. I've attempted a port to gradle before, and will do another one soon-ish. I'll keep you updated when I was able to pull it off and have something workable in git.

ge0rg commented 5 years ago

I've pushed some effort into the new https://github.com/ge0rg/aprsdroid/tree/gradle branch.

It's still flakey, and it currently only supports the OSM version of the app (Google has deprecated the Maps library I'm using).

Instructions:

git clone -b gradle https://github.com/ge0rg/aprsdroid
cd aprsdroid
git submodule init 
git submodule update
gradle installDebug # this will fail, because R.java wasn't there yet
gradle installDebug # this should work

There is an evil hack around an issue I've encountered in the gradle-android-scala-plugin, which makes the first compile and non-debug builds fail.

mpannen1979 commented 4 years ago

I got past this by modifying build.gradle to match the versions listed here: https://github.com/AllBus/gradle-android-scala-plugin#installation

Specifically:

classpath 'com.android.tools.build:gradle:3.5.3' classpath 'com.github.AllBus:gradle-android-scala-plugin:3.5.1'

mpannen1979 commented 4 years ago

Other things you will need to install:

Gradle 5.6.3 java 8 jre and sdk Android 19 sdk Android build tools Your own signing keys as detailed here:

https://stackoverflow.com/questions/18328730/how-to-create-a-release-signed-apk-file-using-gradle

The compiled apk will be at: aprsdroid/build/outputs/apk/release

if you chose to run 'gradle installRelease'

The apk will be in that folder even if you see a warning about a device not being connected.

abdazzamajhari commented 4 years ago

Other things you will need to install:

Gradle 5.6.3 java 8 jre and sdk Android 19 sdk Android build tools Your own signing keys as detailed here:

https://stackoverflow.com/questions/18328730/how-to-create-a-release-signed-apk-file-using-gradle

The compiled apk will be at: aprsdroid/build/outputs/apk/release

if you chose to run 'gradle installRelease'

The apk will be in that folder even if you see a warning about a device not being connected.

hey can you share the code?

dg1sek commented 4 years ago

I didn't manage to compile it even after changing the 3.5.1 to 3.5.3 as mentioned above. Would be really cool if you could publish your gradle file so that one could simply compile it in android studio? Thanks !

`gradle installDebug

FAILURE: Build failed with an exception.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.5.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1s (base) aprsdroid % `

ge0rg commented 4 years ago

@dg1sek thanks for reporting that. I've now updated the build.gradle in the goole-maps-v2 branch to not require RELEASE_STORE_FILE (you won't be able to make a release build, which should be fine as you'll do debug anyway).

I also added some more previously missing files, and now the project compiles for me. However, on one of my PCs, the scala.srcDirs line is deemed as incorrect, so you might have to remove it. It will use the Java path instead, so that is not a big issue.