okta / okta-oidc-android

OIDC SDK for Android
https://github.com/okta/okta-oidc-android
Other
59 stars 45 forks source link

Having trouble compile the sample app. #260

Closed GeforceA closed 3 years ago

GeforceA commented 3 years ago

Hi, Pretty new to the android world. Trying this sample and it won't compile. Got this error from android studio: _C:\Kapsel_projects\okta\okta-oidc-android\library\build\generated\source\buildConfig\debug\com\okta\oidc\BuildConfig.java:13: error: variable VERSION_NAME is already defined in class BuildConfig public static final String VERSIONNAME = "1.0.20"; and this the build config file it generated: _package com.okta.oidc;

public final class BuildConfig { public static final boolean DEBUG = Boolean.parseBoolean("true"); public static final String LIBRARY_PACKAGE_NAME = "com.okta.oidc"; public static final String BUILD_TYPE = "debug"; public static final int VERSION_CODE = 19; public static final String VERSION_NAME = "1.0.20"; // Fields from default config. public static final String VERSIONNAME = "1.0.20"; } tried to run it using the gradlew assemble from command line and got same error

I am using gradle plugin 4.01 and gradle version 6.8.3. Android studio version 4.1.3, 2021 March build

Please advise how should I proceed.

Thanks.

JayNewstrom commented 3 years ago

Hi 👋

Thanks for the issue! Could you try commenting out this line? https://github.com/okta/okta-oidc-android/blob/master/library/build.gradle#L15

Once that's commented out, you should be able to build.

GeforceA commented 3 years ago

That worked. Thanks for the fast response!

JayNewstrom commented 3 years ago

Glad to hear! I'm going to close this issue. But feel free to reopen or open a new issue if you run into something else. Thanks!