Start a new topic

LicenseKey Missing but set in StartupConfiguration

LicenseKey Missing but set in StartupConfiguration


Hi everybody,

I'm facing a strange problem : i've purchased a license for iOS and Android.

Currently i'm working on the android app, i've set the applicationId setted when purchase the license on my graddle defaultConfig.

I call the Key from a string ressource but on my screen there is a layer saying "License Key Missing".

When I was developping using a trial license that worked.

Is there a link between defaultConfig and  and root's package name?

Hi Thibaud,

the defaultConfig configures the core settings of your app. The package name is only set in the gradle file. Do you use product flavors or special build types which override the defaultConfig applicationId?

Best regards,
Simon

I again Simon :)

Here is informations about my project graddle file:

defaultConfig {
applicationId "com.mypackagename"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

productFlavors {
custom {
applicationId "com.mypackagename.custom"
versionName "1.0-vt"
}

}

my app root packagename is not equals com.mypackagename but equals the package in the manifest

And there is my setup for the key(com.anotherpackageAsInGradleFile.MainActivity.java)

 

StartupConfiguration configuration = new StartupConfiguration(getResources().getString(R.string.api_key_wikitude));
try {
this.architectView.onCreate(configuration);
} catch (RuntimeException re) {
re.printStackTrace();
}

 

And when I'm setting a Trail key no error!

Hi again :-)

the package name defined in the manifest do not have to match the applicationId. When you registered the license with us, you provided us with a package name. This exact package name has to be set as your applicationId. 

In your productFlavor custom you are overriding the applicationId. So if you registered "com.mypackagename" with us but use "com.mypackagename.custom" in productFlavor custom, productFlavor custom won't work.

Best regards,
Simon

So if the applicationId I said to you is "com.company.app.RA" and if I need the key in productFlavors , can I do like this ? :

 

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"

defaultConfig {
applicationId "com.company.app"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

productFlavors {
custom {
applicationId "com.company.app.RA"
versionName "1.0-vt"
}

}



 

Hi Thibaud,

yes this will work, for productFlavor custom.

Best regards,
Simon
Login or Signup to post a comment