I am trying to run the sample app from Microsoft's cognitive service (computer vision). I am wondering why is the handwriting import not working? It says "cannot resolve symbol".
import com.microsoft.projectoxford.vision.contract.HandwritingRecognitionOperation;
import com.microsoft.projectoxford.vision.contract.HandwritingRecognitionOperationResult;
import com.microsoft.projectoxford.vision.contract.HandwritingTextLine;
import com.microsoft.projectoxford.vision.contract.HandwritingTextWord;
I solved my own problem by updating projectoxford library dependency on build.gradle file. I think the HandwritingRecognitionOperation class is available only at version 1.0.394.
//Add Library
compile 'com.microsoft.projectoxford:vision:1.0.394'
Related
I have installed PlantUML and added the classpath to it. However, the following import keeps giving me an error in eclipse.
import net.sourceforge.plantuml.SourceFileReader;
It says The import net cannot be resolved
What could be the possible solution to this?
Im using eclipse Photon. The code worcked fine on old computer. When I got a new computer and tried to run the program The following imports are give me a import cannot be resolved error
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.HttpClients;
I'm assuming im missing some jar files. Could some one tell me what jar files I need and whare i can find them? Also why does it work find on ole computer with same jars being added?
Those two classes are part of Apache HTTP Components which you can access from https://hc.apache.org/index.html.
I opened up my project and compiled and ran it, and I'm getting the error mentioned in the title, error: cannot find symbol class ComputableLiveData. I've built a local database using a Room abstraction over SQLite, and the error is occurring in BundleDao_Impl.java.
package com.weaberlumber.programmer.s4s_scan;
import android.arch.lifecycle.ComputableLiveData; //The error is here
import android.arch.lifecycle.LiveData;
import android.arch.persistence.db.SupportSQLiteStatement;
import android.arch.persistence.room.EntityDeletionOrUpdateAdapter;
import android.arch.persistence.room.EntityInsertionAdapter;
import android.arch.persistence.room.InvalidationTracker.Observer;
import android.arch.persistence.room.RoomDatabase;
import android.arch.persistence.room.RoomSQLiteQuery;
import android.arch.persistence.room.util.StringUtil;
I've tried deleting the build folder so that the file could be regenerated, but no luck.
This was fixed by adding the following implementation to the dependencies under build.gradle (Module: app)
implementation 'android.arch.lifecycle:livedata:1.1.1'
I have problem with building my Core/Desktop/Android project in IntelliJ after adding gxd-tools.jar as Core Library.
Please note my imports:
package com.enplug.exampleapp;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.utils.GdxRuntimeException;
import com.enplug.common.logging.ILog;
import com.enplug.sdk.hosting.AppState;
import com.enplug.sdk.hosting.HostedGame;
import com.enplug.sdk.interfaces.FontType;
import com.enplug.sdk.interfaces.IServiceProvider;
import com.enplug.sdk.model.social.SocialFeedDefinition;
import com.badlogic.gdx.graphics.g2d.freetype.*;
import com.badlogic.gdx.tools.imagepacker.TexturePacker2;
and TexturePacker code:
TexturePacker2.process("C:\\pokusatlas", "C:\\pokusatlas", "spritesheet");
Screenshot of my error:
What should I make to avoid this error?
Check the guide about adding libgdx tools to the gradle dependencies. Let me quote the important part:
Tools Gradle
Core Dependency:
Dont put me in core!
==> you should not add gdx tools to core project! Put it in desktop project instead:
compile "com.badlogicgames.gdx:gdx-tools:$gdxVersion"
The issue with adding libgdx-tools to core project is that the libgdx-tools are not compatible with android/ios projects. But android/ios depend on core project, so you cannot add plattform-dependent libs to your core project.
But even if it would be possible to include in core project it wouldn't be a good idea either. I mean you are not going to run TexturePacker in your released apps anyway. Just run TexturePacker during development and include its output in your android assets folder.
When I develop an RMI server, I use:
import java.rmi.server.UnicastRemoteServer;
import java.rmi.server.StubSecurityManager;
import chat.server.*;
But when I compile the Java file, an error occurs that says:
Class java.rmi.server.UnicastRemoteServer not found in import. import
java.rmi.server.UnicastRemoteServer
and also error with StubSecurityManager. Please help me work out this problem.
It appears that you are using an old code written in JDK1.1 trying to compile using newer version of JDK.
You need to make following changes.
java.rmi.server.UnicastRemoteServer -> java.rmi.server.UnicastRemoteObject
java.rmi.server.StubSecurityManager -> java.rmi.RMISecurityManager
Source:
http://groups.google.com/group/comp.lang.java.api/browse_thread/thread/c768d6617f80eedd/4edf4acebd2ce575