A few days ago I saw HighCharts Library is available for Android for graph.
https://github.com/highcharts/highcharts-android
I read the documentation and start it to add on my project but when I am trying to add gradle to my project I'm getting error:
Error:Failed to resolve: com.highsoft.highcharts:6.0.2:
Open File
There are two ways as they mentioned in their documentation:
A) You can download the aar from here: Highcharts and add it manually. Put the aar in the libs folder in your project structure.
B) You can add the library to the gradle dependecies from JCenter.
When I added .aar file to libs folder there is no issue but when I added below code:
HIGChartView chartView = (HIGChartView) findViewById(R.id.hc);
My project not able to find out class HIGChartView
. I'm not able to find out whether it's my side issue or HighCharts Library issue.
I also downloaded poject by Github, Getting no issue on their Project also compare Gradle with their project but I'm not able to find out the issue.
My build.gradle(Module:App) :
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.kabloom.highcharts2"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.highsoft.highcharts:6.0.2' // HighCharts here added
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}