nextcloud / passman-android

:key: Android app for Passman.
https://passman.cc
GNU General Public License v3.0
93 stars 30 forks source link

Build fails due to invalid signing configuration #28

Open honggoff opened 7 years ago

honggoff commented 7 years ago

When building with the gradle wrapper, I get the following error:

FAILURE: Build failed with an exception.

* Where:
Build file '/home/hong/git/passman-android/app/build.gradle' line: 11

* What went wrong:
A problem occurred evaluating project ':app'.
> Could not get unknown property 'ALPHA_STORE' for SigningConfig_Decorated{name=alpha, storeFile=null, storePassword=null, keyAlias=debug, keyPassword=null, storeType=null, v1SigningEnabled=true, v2SigningEnabled=true} of type com.android.build.gradle.internal.dsl.SigningConfig.

Indeed the signing configurations reference these properties ALPHA_STORE, ALPHA_STORE_PASSWORD, etc, the same for the release config.

Did you mean to use environment variables, or how do you set these properties?

Also, there is a build type debubug, which I believe is a typo.

seddarj commented 7 years ago

You need to create a gradle.properties file based on the gradle.properties.example file. The ALPHA_STORE property is the path to a keystore. You can create a keystore through Android Studio if you need to (Build > Generate Signed APK > Create New).

animalillo commented 7 years ago

nah, the build types are fine as they are, and yes, as @seddarj said, you need to copy the exmple gradle.properties.example to a gradle.properties and set there the path to your desired keystore and keys for the build types you gonna use.

Let us know if you manage to compile it so we can close the issue or give some more help! :D

honggoff commented 7 years ago

Thanks for the hint about the example properties file, for some reason I missed that. I am now able to build the debubug build type. I will probably add these instructions to the Readme file and create a pull request for the next clueless person.

Unfortunately the debug build type is broken, running ./gradlew assebleDebug fails with

.../app/build/intermediates/manifests/full/armabi/debug/AndroidManifest.xml:17:24-40: AAPT: No resource found that matches the given name (at 'label' with value '@string/app_name').

Is there some other trick I'm missing or are you not supposed to use the debug build type?