Not able to show image (API setDrawIcons() not found error) - mpandroidchart

I am using MPAndroidChart in our android project to show graph and it's very helpful. Using latest version 3.0.1 (https://github.com/PhilJay/MPAndroidChart#usage)
I have some requirement to show image on top of BarEntry after some condition met. Same is working in example code downloaded.
BarDataSet set1;
set1.setDrawIcons(true);// Cannot resolve method 'setDrawIcons(boolen)
Why the above API is not part of library MPChartLib, am I missing something here?

Above problem got solved after integrating MPChartLib source code.
File -> Project Structure
click plus button to add New Module
Import Gradle Project
from Source directory: and finish.

The setDrawIcons method was added in 3.0.2. Change your Gradle option to read compile 'com.github.PhilJay:MPAndroidChart:v3.0.2'

Related

Not able to add implementation 'com.google.android.libraries.places:places:2.2.0'

I am trying to add Places SDK for android.
I am following the following documentation
https://developers.google.com/places/android-sdk/start and
https://developers.google.com/places/android-sdk/client-migration
Unfortunately i am not able to add dependency "implementation 'com.google.android.libraries.places:places:2.2.0'"
I have gone through following links. But no use. Please help me with this.
Failed to resolve: com.google.android.libraries.places:1.0.0:
Google's new Places Library ( implementation 'com.google.android.libraries.places:1.0.0') not resolving
Finally i found solution to my issue.
I solved it by installing the compatibility library.
Followed this. https://developers.google.com/places/android-sdk/client-migration
Following two steps resolved my issue.
Copy the contents of places_compat_compatify.sh, and save as a file to your local computer.
Use the following command to run the compatibility script
./places_compat_compatify.sh 2.1.0
After this, I could run my project successfully and could Place API.
Thanks

React Native Android fails: error 3

Hope you could help me here:
I'm currently building an app which I created through CRNA and then ejected. I get the ios version right on but I'm currently struggling a lot with the android version.
When running react-native run-android all I can get is the following error:
Error type 3
Error: Activity class {com.myapp/com.myapp.MainActivity} does not exist.
I've checked app/build.gradle, app/src/main/AndroidManifest.xml, app/src/main/java/com/myapp/MainActivity.java and app/src/main/java/com/myapp/MainActivity.java for name errors on package. I've tried moving from com.myapp to com.mebius.myapp and com aswell.
Seems this comes from the only plugin I'm using. I'm keeping on the investigation
Any hints?
There are 3 possible reasons for the android app build fails to make
1. You need to define sdk path in android/local.properties
if local.properties doesn't place then make a file names with that
add
sdk.dir = home/user/AndroidApp/local/Sdk
You can match with their system path..
2. Your genymotion or avd must enable with the android studio
3. You must have to go with the following command
npm start
in new terminal .
Please go through with it.
Thanks
Actually I had a problem with my gradle config which look like:
include ':react-native-sensors'
project(':react-native-sensors').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-sensors/android')
rootProject.name = 'accelapp'
I needed to add: include ':app'
I don't know if it's due to the process of ejecting from CRNA or if it's due to react-native link react-native-sensors though.
EDIT After some investigation, I couldn't reproduce this issue. This leads me to say it was a faulty copy/paste...

Kotlin - Error: Could not find or load main class _DefaultPackage

I followed the Kotlin tutorial for eclipse here : Getting Started With Eclipse Luna
However, I'm running into this error:
Error: Could not find or load main class _DefaultPackage
Anyone who knows to get around this?
This was a severe bug (KT-10221) in automatic generation of Launch Configuration in plugin version 0.4.0. It was fixed in 0.5.0 so the recommendend way to workaround is to update plugin.
The source of the problem was that the plugin used an old pattern for generating name of the class for main function that had been abandoned by Kotlin compiler.
It's possible to workaround it by editing launch configuration (Eclipse Menu -> Run -> Run Configurations...) by hand and changing Main class field in Java Application group. If the file is named hello.kt with no package directive, as it is described in tutorial, than corrected string should be HelloKt.
If file has name other.kt with package my.tutorial than the Main Class should contain my.tutorial.HelloKt. You can read more about it in the section Package-Level Functions of Calling Kotlin From Java page.
I have been getting the same issue. And after putting the right compiler output path, it got resolved.
Go to Project -> Project Compiler output :
In the text box, fill this:
[Absolute Path]/{Project Name}/out
In my case I was having this problem while trying to run the program using the Application Gradle plugin. The problem was in the mainClassName property using single quotes instead of double ones
This didn't work:
mainClassName = 'demo.HelloWorldKt'
With double quotes, it works:
mainClassName = "demo.HelloWorldKt"
For me it worked after I installed the correct JDK. I first had JDK 11 but the tutorial I did was with JDK 8 so after I installed this and set it in the "installed JREs" options it found the main class without having any "mainClassName" or any other option in the build.gradle file.
For me, it worked in a fresh eclipse workspace. Possibly, the Kotlin eclipse plugin is not playing well with other plugins (in my case, PyDev).
I'm creating a Kotlin Application with JavaFX and I had this issue until I went to:
Run > Run Configurations > Java Application > Common
I unticked "Allocate console" and it fixed the issue.

Deploy Qt3D project for Android under win 7

I've successfully deployed the cube example APK by creating a new Quick 2 project and copy qml file there, but got "module "Qt3D" plugin "qthreedqmlplugin" not found" error message, any clue for this? I already place the so file into imports/Qt3D folder, but no success. Thanks.
Edit: I tried using Qt 5.1.1 and followed the Qt3D installation described here (http://qt-project.org/wiki/Qt3D-Installation) , and can get rid of the plugin not found error message above. But, this time, a message of “library “libQt53DQuick.so” not found” show up as follows:
W/Qt (29930): assets:/qml/3dCube/main.qml:2 (): assets:/qml/3dCube/main.qml:2:1: plugin cannot be loaded for module "Qt3D": Cannot load library /data/data/org.qtproject.example.test3D/qml/Qt3D/libqthreedqmlplugin.so: (Cannot load library: soinfo_link_image(linker.cpp:1635): could not load library "libQt53DQuick.so" needed by "libqthreedqmlplugin.so"; caused by load_library(linker.cpp:745): library "libQt53DQuick.so" not found)
The problem been solved! After adding the following line in my .pro file:
QT += qml quick 3dquick
The example works well in my sony android phone with adreno gpu, but not in my new lenovo yoga 8" with PowerVR gpu which I'll look into later.
Edit: BTW I eventually use QT5.2.1 for building my example.
That's because in Qt 5.3 there was no way to figure out the plugin dependencies of qml imports. In 5.4, we have the qml import scanner that avoids the need to edit your .pro files to mention qml import dependencies.

Cannot resolve method 'ok(?)' with Play 2 Framework in Intellij

I have been trying to get play set up in IntelliJ for hours but I can't get it to work correctly.
I continuously get this error: http://imgur.com/MYY8fXI
I have tried create a project though the terminal with:
play new
and then using the terminal to create the idea files with
idea with-sources=yes
I have also installed the play 2 plugin and used it to create the project, but I get the same error.
I am able to use the plugin I downloaded to successfully run the app and view it in my browser, but I keep getting the
Cannot resolve method 'ok(?)' error.
edit: I am using OSX, and have the ultimate version of Intellij.
edit 2: I have made a little progress. If I import the view directly using import views.html.index; it gets rid of the errors on the application. However, if I use import views.html.*; it results in the errors. Any ideas?
At the time of this writing, it seems that play2 support in IntelliJ 13 Ultimate has some minor problems...
How I did solve the issues:
1) Navigate to your project director and start your play console (play.bat / play.sh should be on the PATH)
2) enter command 'compile' in your play console
3) enter command 'idea" in your play console
4a) in case your IntelliJ project was alread open, IntelliJ will detect the changes and suggest to reload the project. Confirm you want to reload
4b) in case IntelliJ was not running, open the project by File | Open... and select your project Directory.
These steps should resolve your issue.
Does it help to make sure that play has compiled the templates to class files, 'run' + open in browser or 'compile'?