Pre loader

Problem adding Library

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

Answered
0
0

Hello
Currently, I downloaded Schichart Android (trial version).
But I cannot add its library to my application dependency.
I think it is caused because of my SDK version. (As it shows error: ‘compile’ is not permitted here , use ‘implementation’ instead)
As I guess SchiChart use Android 4.4 KitKat -9.x, while I use (SDK) Nougat and higher versions.
Is my assumption right, or are there any other problems connected with it?
Can you help me please with advice.
thanks in advance.
Best regards.

Version
android 4.4 KitKat-9.x
  • You must to post comments
Best Answer
2
0

Hi Rashid,

You’re probably using steps which were added for v2.x. Please take a look on updated tutorial for v3, but there will be one minor change because v3 is in beta now and instead of :

// Declaring a new Maven repository
maven { url 'https://www.myget.org/F/abtsoftware/maven' }

there should be maven repository for bleeding edge releases where we published beta:

// Declaring a new Maven repository
maven { url 'https://www.myget.org/F/abtsoftware-bleeding-edge/maven' }

Hope this will help you!

Best regards,
Yura

  • You must to post comments
0
0

Mr. Yura Khariton
Thank you for quick answer
Regards

  • You must to post comments
0
0

Hi, Yura
I’m bothering you again because after adding the library to my application dependencies, I faced another problem. I cannot set my trial License key.
I read many times tutorial (https://www.scichart.com/licensing-scichart-android/), however I cannot find out where to put my license key. As I work in AndroidStudio, there a lot of java files. Firstly I try to put it in a MainActivity.java file, but this method didn’t help me. So after that, I tried to put it in a new java file(license.java). Content of this file shown below

package com.example.my5.ui;

import android.app.Application;
import android.util.Log;

public class License extends Application {

private static License sInstance;
public static License getInstance() {
return sInstance; }

    @Override
    public void onCreate() {
        super.onCreate();
        sInstance = this;
        setUpSciChartLicense();
    private void setUpSciChartLicense() {
        try {            com.scichart.charting.visuals.SciChartSurface.setRuntimeLicenseKey(
        "<LicenseContract>\n" +
        "  <Customer>[email protected]</Customer>\n" +
        "  <OrderId>Trial</OrderId>\n" +
        "  <LicenseCount>1</LicenseCount>\n" +
        "  <IsTrialLicense>true</IsTrialLicense>\n" +
        "  <SupportExpires>12/31/2019 00:00:00</SupportExpires>\n" +
        "  <ProductCode>SC-ANDROID-2D-ENTERPRISE-SRC</ProductCode>\n" +
        "  <KeyCode>28a24cba4....8a6c</KeyCode>\n" +
         "</LicenseContract>"); } 

catch (Exception e) {
Log.e(“SciChart”, “Error when setting the license”, e); } } }

After that I run emulator, my app works but when I want to add graph view of Scichart, it give me error.
Where I make a mistake, I don’t know,
Thanks in advance.
Best Regards

  • Yura Khariton
    Did you add usage of License class in your app’s manifest? Without specifying it in manifest it may be not called and as result license won’t be applied. Please try to set up a breakpoint somewhere in onCreate() to check if it’s called.
  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.