Liferay service builder error on windows - liferay

I am new to Liferay. While building service, i am getting following error.
liferay version :liferay-portal-6.2-ce-ga6
plugin sdk:liferay-plugins-sdk-7.0
Please help.
below is the error:
[Console output redirected to file:D:\LDS\lds\DeveloperStudio\workspace.metadata.plugins\com.liferay.ide.sdk.core\sdk.log]
Buildfile: D:\LDS\lds\lsdk\portlets\AAA-portlet\build.xml
build-service:
[jar] Building MANIFEST-only jar: D:\LDS\lds\lsdk\portlets\AAA-portlet\service-builder-classpath.jar
[delete] Deleting: D:\LDS\lds\lsdk\portlets\AAA-portlet\service-builder-classpath.jar.manifest
[delete] Deleting: D:\LDS\lds\lsdk\portlets\AAA-portlet\service-builder-classpath.jar
[echo] Building Foo
[echo] Writing D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\src\service.properties
[javac] Compiling 18 source files to D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service-classes
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\exception\NoSuchFooException.java:19: error: cannot find symbol
[javac] import com.liferay.portal.kernel.exception.NoSuchModelException;
[javac] ^
[javac] symbol: class NoSuchModelException
[javac] location: package com.liferay.portal.kernel.exception
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\exception\NoSuchFooException.java:25: error: cannot find symbol
[javac] public class NoSuchFooException extends NoSuchModelException {
[javac] ^
[javac] symbol: class NoSuchModelException
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\Foo.java:19: error: cannot find symbol
[javac] import com.liferay.portal.kernel.annotation.ImplementationClassName;
[javac] ^
[javac] symbol: class ImplementationClassName
[javac] location: package com.liferay.portal.kernel.annotation
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\Foo.java:20: error: package com.liferay.portal.kernel.model does not exist
[javac] import com.liferay.portal.kernel.model.PersistedModel;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooModel.java:19: error: package com.liferay.expando.kernel.model does not exist
[javac] import com.liferay.expando.kernel.model.ExpandoBridge;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooModel.java:22: error: package com.liferay.portal.kernel.model does not exist
[javac] import com.liferay.portal.kernel.model.BaseModel;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooModel.java:23: error: package com.liferay.portal.kernel.model does not exist
[javac] import com.liferay.portal.kernel.model.CacheModel;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooModel.java:24: error: package com.liferay.portal.kernel.model does not exist
[javac] import com.liferay.portal.kernel.model.GroupedModel;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooModel.java:25: error: package com.liferay.portal.kernel.model does not exist
[javac] import com.liferay.portal.kernel.model.ShardedModel;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooModel.java:26: error: package com.liferay.portal.kernel.service does not exist
[javac] import com.liferay.portal.kernel.service.ServiceContext;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooModel.java:46: error: cannot find symbol
[javac] public interface FooModel extends BaseModel, GroupedModel, ShardedModel {
[javac] ^
[javac] symbol: class BaseModel
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooModel.java:46: error: cannot find symbol
[javac] public interface FooModel extends BaseModel, GroupedModel, ShardedModel {
[javac] ^
[javac] symbol: class GroupedModel
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooModel.java:46: error: cannot find symbol
[javac] public interface FooModel extends BaseModel, GroupedModel, ShardedModel {
[javac] ^
[javac] symbol: class ShardedModel
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\Foo.java:34: error: cannot find symbol
[javac] public interface Foo extends FooModel, PersistedModel {
[javac] ^
[javac] symbol: class PersistedModel
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\Foo.java:32: error: cannot find symbol
[javac] #ImplementationClassName("z.model.impl.FooImpl")
[javac] ^
[javac] symbol: class ImplementationClassName
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooModel.java:295: error: cannot find symbol
[javac] public ExpandoBridge getExpandoBridge();
[javac] ^
[javac] symbol: class ExpandoBridge
[javac] location: interface FooModel
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooModel.java:298: error: cannot find symbol
[javac] public void setExpandoBridgeAttributes(BaseModel baseModel);
[javac] ^
[javac] symbol: class BaseModel
[javac] location: interface FooModel
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooModel.java:301: error: cannot find symbol
[javac] public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge);
[javac] ^
[javac] symbol: class ExpandoBridge
[javac] location: interface FooModel
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooModel.java:304: error: cannot find symbol
[javac] public void setExpandoBridgeAttributes(ServiceContext serviceContext);
[javac] ^
[javac] symbol: class ServiceContext
[javac] location: interface FooModel
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooModel.java:316: error: cannot find symbol
[javac] public CacheModel toCacheModel();
[javac] ^
[javac] symbol: class CacheModel
[javac] location: interface FooModel
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooClp.java:21: error: package com.liferay.portal.kernel.model does not exist
[javac] import com.liferay.portal.kernel.model.BaseModel;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooClp.java:22: error: package com.liferay.portal.kernel.model does not exist
[javac] import com.liferay.portal.kernel.model.User;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooClp.java:23: error: package com.liferay.portal.kernel.model.impl does not exist
[javac] import com.liferay.portal.kernel.model.impl.BaseModelImpl;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooClp.java:24: error: package com.liferay.portal.kernel.service does not exist
[javac] import com.liferay.portal.kernel.service.UserLocalServiceUtil;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooClp.java:45: error: cannot find symbol
[javac] public class FooClp extends BaseModelImpl implements Foo {
[javac] ^
[javac] symbol: class BaseModelImpl
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooClp.java:477: error: cannot find symbol
[javac] public BaseModel getFooRemoteModel() {
[javac] ^
[javac] symbol: class BaseModel
[javac] location: class FooClp
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooClp.java:481: error: cannot find symbol
[javac] public void setFooRemoteModel(BaseModel fooRemoteModel) {
[javac] ^
[javac] symbol: class BaseModel
[javac] location: class FooClp
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooClp.java:723: error: cannot find symbol
[javac] private BaseModel _fooRemoteModel;
[javac] ^
[javac] symbol: class BaseModel
[javac] location: class FooClp
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooWrapper.java:19: error: package com.liferay.expando.kernel.model does not exist
[javac] import com.liferay.expando.kernel.model.ExpandoBridge;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooWrapper.java:21: error: package com.liferay.portal.kernel.model does not exist
[javac] import com.liferay.portal.kernel.model.ModelWrapper;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooWrapper.java:22: error: package com.liferay.portal.kernel.service does not exist
[javac] import com.liferay.portal.kernel.service.ServiceContext;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooWrapper.java:41: error: cannot find symbol
[javac] public class FooWrapper implements Foo, ModelWrapper {
[javac] ^
[javac] symbol: class ModelWrapper
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooWrapper.java:182: error: cannot find symbol
[javac] public ExpandoBridge getExpandoBridge() {
[javac] ^
[javac] symbol: class ExpandoBridge
[javac] location: class FooWrapper
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooWrapper.java:373: error: package com.liferay.portal.kernel.model does not exist
[javac] com.liferay.portal.kernel.model.BaseModel baseModel) {
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooWrapper.java:378: error: cannot find symbol
[javac] public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) {
[javac] ^
[javac] symbol: class ExpandoBridge
[javac] location: class FooWrapper
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooWrapper.java:383: error: cannot find symbol
[javac] public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
[javac] ^
[javac] symbol: class ServiceContext
[javac] location: class FooWrapper
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\model\FooWrapper.java:518: error: package com.liferay.portal.kernel.model does not exist
[javac] public com.liferay.portal.kernel.model.CacheModel toCacheModel() {
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\ClpSerializer.java:23: error: package com.liferay.portal.kernel.model does not exist
[javac] import com.liferay.portal.kernel.model.BaseModel;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\ClpSerializer.java:101: error: cannot find symbol
[javac] public static Object translateInput(BaseModel oldModel) {
[javac] ^
[javac] symbol: class BaseModel
[javac] location: class ClpSerializer
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\ClpSerializer.java:125: error: cannot find symbol
[javac] public static Object translateInputFoo(BaseModel oldModel) {
[javac] ^
[javac] symbol: class BaseModel
[javac] location: class ClpSerializer
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\ClpSerializer.java:147: error: cannot find symbol
[javac] public static Object translateOutput(BaseModel oldModel) {
[javac] ^
[javac] symbol: class BaseModel
[javac] location: class ClpSerializer
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\ClpSerializer.java:275: error: cannot find symbol
[javac] public static Object translateOutputFoo(BaseModel oldModel) {
[javac] ^
[javac] symbol: class BaseModel
[javac] location: class ClpSerializer
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalService.java:21: error: cannot find symbol
[javac] import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
[javac] ^
[javac] symbol: class IndexableActionableDynamicQuery
[javac] location: package com.liferay.portal.kernel.dao.orm
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalService.java:25: error: package com.liferay.portal.kernel.model does not exist
[javac] import com.liferay.portal.kernel.model.PersistedModel;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalService.java:28: error: package com.liferay.portal.kernel.service does not exist
[javac] import com.liferay.portal.kernel.service.BaseLocalService;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalService.java:29: error: package com.liferay.portal.kernel.service does not exist
[javac] import com.liferay.portal.kernel.service.InvokableLocalService;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalService.java:30: error: package com.liferay.portal.kernel.service does not exist
[javac] import com.liferay.portal.kernel.service.PersistedModelLocalService;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalService.java:57: error: cannot find symbol
[javac] public interface FooLocalService extends BaseLocalService, InvokableLocalService,
[javac] ^
[javac] symbol: class BaseLocalService
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalService.java:57: error: cannot find symbol
[javac] public interface FooLocalService extends BaseLocalService, InvokableLocalService,
[javac] ^
[javac] symbol: class InvokableLocalService
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalService.java:58: error: cannot find symbol
[javac] PersistedModelLocalService {
[javac] ^
[javac] symbol: class PersistedModelLocalService
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalService.java:105: error: cannot find symbol
[javac] public PersistedModel deletePersistedModel(PersistedModel persistedModel)
[javac] ^
[javac] symbol: class PersistedModel
[javac] location: interface FooLocalService
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalService.java:105: error: cannot find symbol
[javac] public PersistedModel deletePersistedModel(PersistedModel persistedModel)
[javac] ^
[javac] symbol: class PersistedModel
[javac] location: interface FooLocalService
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalService.java:147: error: type OrderByComparator does not take parameters
[javac] int end, OrderByComparator orderByComparator);
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalService.java:206: error: cannot find symbol
[javac] public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
[javac] ^
[javac] symbol: class IndexableActionableDynamicQuery
[javac] location: interface FooLocalService
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalService.java:217: error: cannot find symbol
[javac] public PersistedModel getPersistedModel(Serializable primaryKeyObj)
[javac] ^
[javac] symbol: class PersistedModel
[javac] location: interface FooLocalService
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalServiceClp.java:19: error: package com.liferay.portal.kernel.service does not exist
[javac] import com.liferay.portal.kernel.service.InvokableLocalService;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalServiceClp.java:27: error: cannot find symbol
[javac] public FooLocalServiceClp(InvokableLocalService invokableLocalService) {
[javac] ^
[javac] symbol: class InvokableLocalService
[javac] location: class FooLocalServiceClp
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalServiceClp.java:226: error: package com.liferay.portal.kernel.model does not exist
[javac] com.liferay.portal.kernel.model.PersistedModel persistedModel) ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalServiceClp.java:545: error: cannot find symbol
[javac] public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
[javac] ^
[javac] symbol: class IndexableActionableDynamicQuery
[javac] location: package com.liferay.portal.kernel.dao.orm
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalServiceClp.java:591: error: package com.liferay.portal.kernel.model does not exist
[javac] public com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalServiceClp.java:651: error: cannot find symbol
[javac] private InvokableLocalService _invokableLocalService;
[javac] ^
[javac] symbol: class InvokableLocalService
[javac] location: class FooLocalServiceClp
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalServiceUtil.java:20: error: package com.liferay.portal.kernel.service does not exist
[javac] import com.liferay.portal.kernel.service.InvokableLocalService;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalServiceUtil.java:91: error: package com.liferay.portal.kernel.model does not exist
[javac] com.liferay.portal.kernel.model.PersistedModel persistedModel)
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalServiceUtil.java:90: error: package com.liferay.portal.kernel.model does not exist
[javac] public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalServiceUtil.java:145: error: type OrderByComparator does not take parameters
[javac] com.liferay.portal.kernel.util.OrderByComparator orderByComparator) {
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalServiceUtil.java:218: error: cannot find symbol
[javac] public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
[javac] ^
[javac] symbol: class IndexableActionableDynamicQuery
[javac] location: package com.liferay.portal.kernel.dao.orm
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalServiceUtil.java:231: error: package com.liferay.portal.kernel.model does not exist
[javac] public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalServiceWrapper.java:19: error: package com.liferay.portal.kernel.service does not exist
[javac] import com.liferay.portal.kernel.service.ServiceWrapper;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalServiceWrapper.java:30: error: cannot find symbol
[javac] ServiceWrapper {
[javac] ^
[javac] symbol: class ServiceWrapper
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalServiceWrapper.java:86: error: package com.liferay.portal.kernel.model does not exist
[javac] com.liferay.portal.kernel.model.PersistedModel persistedModel)
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalServiceWrapper.java:85: error: package com.liferay.portal.kernel.model does not exist
[javac] public com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalServiceWrapper.java:144: error: type OrderByComparator does not take parameters
[javac] com.liferay.portal.kernel.util.OrderByComparator orderByComparator) {
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalServiceWrapper.java:225: error: cannot find symbol
[javac] public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
[javac] ^
[javac] symbol: class IndexableActionableDynamicQuery
[javac] location: package com.liferay.portal.kernel.dao.orm
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooLocalServiceWrapper.java:240: error: package com.liferay.portal.kernel.model does not exist
[javac] public com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooService.java:22: error: package com.liferay.portal.kernel.security.access.control does not exist
[javac] import com.liferay.portal.kernel.security.access.control.AccessControlled;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooService.java:23: error: package com.liferay.portal.kernel.service does not exist
[javac] import com.liferay.portal.kernel.service.BaseService;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooService.java:24: error: package com.liferay.portal.kernel.service does not exist
[javac] import com.liferay.portal.kernel.service.InvokableService;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooService.java:44: error: cannot find symbol
[javac] public interface FooService extends BaseService, InvokableService {
[javac] ^
[javac] symbol: class BaseService
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooService.java:44: error: cannot find symbol
[javac] public interface FooService extends BaseService, InvokableService {
[javac] ^
[javac] symbol: class InvokableService
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooService.java:39: error: cannot find symbol
[javac] #AccessControlled
[javac] ^
[javac] symbol: class AccessControlled
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooServiceClp.java:19: error: package com.liferay.portal.kernel.service does not exist
[javac] import com.liferay.portal.kernel.service.InvokableService;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooServiceClp.java:27: error: cannot find symbol
[javac] public FooServiceClp(InvokableService invokableService) {
[javac] ^
[javac] symbol: class InvokableService
[javac] location: class FooServiceClp
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooServiceClp.java:65: error: cannot find symbol
[javac] private InvokableService _invokableService;
[javac] ^
[javac] symbol: class InvokableService
[javac] location: class FooServiceClp
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooServiceUtil.java:20: error: package com.liferay.portal.kernel.service does not exist
[javac] import com.liferay.portal.kernel.service.InvokableService;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooServiceWrapper.java:19: error: package com.liferay.portal.kernel.service does not exist
[javac] import com.liferay.portal.kernel.service.ServiceWrapper;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\FooServiceWrapper.java:30: error: cannot find symbol
[javac] ServiceWrapper {
[javac] ^
[javac] symbol: class ServiceWrapper
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\persistence\FooPersistence.java:19: error: package com.liferay.portal.kernel.service.persistence does not exist
[javac] import com.liferay.portal.kernel.service.persistence.BasePersistence;
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\persistence\FooPersistence.java:38: error: cannot find symbol
[javac] public interface FooPersistence extends BasePersistence {
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\persistence\FooPersistence.java:260: error: type OrderByComparator does not take parameters
[javac] com.liferay.portal.kernel.util.OrderByComparator<Foo> orderByComparator);
[javac] ^
[javac] D:\LDS\lds\lsdk\portlets\AAA-portlet\docroot\WEB-INF\service\z\service\persistence\FooUtil.java:21: error: package com.liferay.portal.kernel.service does not exist
[javac] import com.liferay.portal.kernel.service.ServiceContext;
[javac] ^
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 100 errors
BUILD FAILED
D:\LDS\lds\lsdk\build-common-plugin.xml:542: The following error occurred while executing this line:
D:\LDS\lds\lsdk\build-common.xml:985: Compile failed; see the compiler error output for details.
Total time: 16 seconds

You state that you're using the 7.0 SDK with liferay 6.2. Don't do that, use the matching version. 7.0 has quite a lot API updates that are incompatible with 6.2 and it seems that you're running into these.
However, it's hard to tell (or give more details) if all you post is the error message and not (a minimal version of) your code.

Related

Powermock + Mockito + Testng implementation not working

So I'm basing my implementation on this site "http://www.handverdrahtet.org/2012/10/unittest-to-verify-that-static-method.html" but it's giving me an error:
-------------------------------------------------------------------------------
Test set: TestSuite
-------------------------------------------------------------------------------
Tests run: 3, Failures: 2, Errors: 0, Skipped: 1, Time elapsed: 1.675 s <<< FAILURE! - in TestSuite
com.example.Activity1Test.shouldShowInputDialogOnUpdateTextButtonClick Time elapsed: 0.005 s <<< FAILURE!
java.lang.reflect.InaccessibleObjectException: Unable to make protected native java.lang.Object java.lang.Object.clone() throws java.lang.CloneNotSupportedException accessible: module java.base does not "opens java.lang" to unnamed module #30cb5b99
at com.example.Activity1Test.shouldShowInputDialogOnUpdateTextButtonClick(Activity1Test.java)
com.example.Activity1Test.afterPowerMockTestMethod Time elapsed: 0.007 s <<< FAILURE!
java.lang.reflect.InaccessibleObjectException: Unable to make protected native java.lang.Object java.lang.Object.clone() throws java.lang.CloneNotSupportedException accessible: module java.base does not "opens java.lang" to unnamed module #4089713
Here is the test() function I used in my Test file:
public void test(String msg) {
JOptionPane.showInputDialog("Enter a string.");
}
Here is the current Test file:
package com.example;
import static org.mockito.Mockito.*;
import static org.powermock.api.mockito.PowerMockito.*;
import javax.swing.*;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.testng.PowerMockTestCase;
import org.testng.annotations.Test;
#PrepareForTest(JOptionPane.class)
public class Activity1Test extends PowerMockTestCase {
/**
* Unittest to verify that static method is called with the specified parameter.
*/
#Test
public void shouldShowInputDialogOnUpdateTextButtonClick() {
mockStatic(JOptionPane.class);
Activity1 activity1 = new Activity1();
activity1.test("foo");
verifyStatic(JOptionPane.class);
JOptionPane.showInputDialog("foo");
}
}

Android Studio duplicate generated files

Android studio keeps creating generated classes, even though they already exist.
The problem has something to do with the NavigationArgs I guess but it always gives some error of duplication.
The only way that solves my problem now is to clean the entire project every time before I run the app.
Does anyone know how to fix this, how do I know which implementation is causing this error?
Gradle Project
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.1'
classpath 'com.google.gms:google-services:4.3.2'
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.2.0-beta01"
classpath ('com.google.firebase:firebase-plugins:1.1.0') {
exclude group: 'com.google.guava', module: 'guava-jdk5'
}
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Gradle Module
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: "androidx.navigation.safeargs"
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.umbrella.budgetapp"
minSdkVersion 28
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.13-beta-3'
androidTestImplementation 'androidx.test:runner:1.3.0-alpha02'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha02'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.palette:palette:1.0.0'
implementation 'com.google.android.material:material:1.1.0-beta01'
implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
implementation 'androidx.recyclerview:recyclerview:1.1.0-beta05'
implementation 'androidx.viewpager:viewpager:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation 'com.github.ronaldsmartin:Material-ViewPagerIndicator:1.0.4'
implementation 'androidx.navigation:navigation-fragment:2.1.0'
implementation 'androidx.navigation:navigation-ui:2.1.0'
implementation 'com.firebaseui:firebase-ui-firestore:5.0.0'
implementation 'com.google.firebase:firebase-auth:19.1.0'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
implementation 'com.jakewharton:butterknife:10.2.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.0'
implementation 'org.jetbrains:annotations:15.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.github.bumptech.glide:glide:4.10.0'
}
Build output
> Task :app:compileDebugJavaWithJavac
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/buildConfig/debug/com/umbrella/budgetapp/BuildConfig 2.java:6: error: class BuildConfig is public, should be declared in a file named BuildConfig.java
public final class BuildConfig {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/buildConfig/debug/com/umbrella/budgetapp/BuildConfig.java:6: error: duplicate class: com.umbrella.budgetapp.BuildConfig
public final class BuildConfig {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/Fragments/IconsDirections 4.java:9: error: class IconsDirections is public, should be declared in a file named IconsDirections.java
public class IconsDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/Fragments/GoalDetailsDirections 6.java:9: error: class GoalDetailsDirections is public, should be declared in a file named GoalDetailsDirections.java
public class GoalDetailsDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/Fragments/GoalsReachedDirections 4.java:16: error: class GoalsReachedDirections is public, should be declared in a file named GoalsReachedDirections.java
public class GoalsReachedDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/Fragments/PlannedPaymentsDirections 4.java:16: error: class PlannedPaymentsDirections is public, should be declared in a file named PlannedPaymentsDirections.java
public class PlannedPaymentsDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/Fragments/PlannedPaymentsDirections.java:16: error: duplicate class: com.umbrella.budgetapp.Layouts.Fragments.PlannedPaymentsDirections
public class PlannedPaymentsDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/Fragments/GoalsReachedDirections.java:16: error: duplicate class: com.umbrella.budgetapp.Layouts.Fragments.GoalsReachedDirections
public class GoalsReachedDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/Fragments/GoalsPausedDirections 4.java:16: error: class GoalsPausedDirections is public, should be declared in a file named GoalsPausedDirections.java
public class GoalsPausedDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/Fragments/ShoppingListItemsArgs 4.java:13: error: class ShoppingListItemsArgs is public, should be declared in a file named ShoppingListItemsArgs.java
public class ShoppingListItemsArgs implements NavArgs {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/Fragments/GoalsActiveDirections 5.java:16: error: class GoalsActiveDirections is public, should be declared in a file named GoalsActiveDirections.java
public class GoalsActiveDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/Fragments/DebtsBorrowedDirections 5.java:16: error: class DebtsBorrowedDirections is public, should be declared in a file named DebtsBorrowedDirections.java
public class DebtsBorrowedDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/Fragments/ShoppingItemsArgs 4.java:13: error: class ShoppingItemsArgs is public, should be declared in a file named ShoppingItemsArgs.java
public class ShoppingItemsArgs implements NavArgs {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/Fragments/ShoppingListItemsDirections 4.java:16: error: class ShoppingListItemsDirections is public, should be declared in a file named ShoppingListItemsDirections.java
public class ShoppingListItemsDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/Fragments/StatisticsBalanceDirections 7.java:9: error: class StatisticsBalanceDirections is public, should be declared in a file named StatisticsBalanceDirections.java
public class StatisticsBalanceDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/Fragments/DebtsLentDirections 5.java:16: error: class DebtsLentDirections is public, should be declared in a file named DebtsLentDirections.java
public class DebtsLentDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/Fragments/ShoppingListItemsArgs.java:13: error: duplicate class: com.umbrella.budgetapp.Layouts.Fragments.ShoppingListItemsArgs
public class ShoppingListItemsArgs implements NavArgs {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/Fragments/ShoppingListsDirections 4.java:17: error: class ShoppingListsDirections is public, should be declared in a file named ShoppingListsDirections.java
public class ShoppingListsDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/Fragments/GoalDetailsArgs 5.java:13: error: class GoalDetailsArgs is public, should be declared in a file named GoalDetailsArgs.java
public class GoalDetailsArgs implements NavArgs {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/Fragments/GoalDetailsDirections.java:9: error: duplicate class: com.umbrella.budgetapp.Layouts.Fragments.GoalDetailsDirections
public class GoalDetailsDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/Fragments/StatisticsCashflowDirections 4.java:9: error: class StatisticsCashflowDirections is public, should be declared in a file named StatisticsCashflowDirections.java
public class StatisticsCashflowDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/Fragments/StoresDirections 4.java:16: error: class StoresDirections is public, should be declared in a file named StoresDirections.java
public class StoresDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/Fragments/IconsDirections.java:9: error: duplicate class: com.umbrella.budgetapp.Layouts.Fragments.IconsDirections
public class IconsDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/Fragments/GoalsPausedDirections.java:16: error: duplicate class: com.umbrella.budgetapp.Layouts.Fragments.GoalsPausedDirections
public class GoalsPausedDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/UpdateFragments/UpdateUserProfileDirections 10.java:8: error: class UpdateUserProfileDirections is public, should be declared in a file named UpdateUserProfileDirections.java
public class UpdateUserProfileDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/UpdateFragments/UpdateDebtDirections 4.java:9: error: class UpdateDebtDirections is public, should be declared in a file named UpdateDebtDirections.java
public class UpdateDebtDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/UpdateFragments/UpdateAccountDirections 4.java:9: error: class UpdateAccountDirections is public, should be declared in a file named UpdateAccountDirections.java
public class UpdateAccountDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/UpdateFragments/UpdateCategoryArgs 6.java:13: error: class UpdateCategoryArgs is public, should be declared in a file named UpdateCategoryArgs.java
public class UpdateCategoryArgs implements NavArgs {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/UpdateFragments/UpdateCategoryDirections 4.java:9: error: class UpdateCategoryDirections is public, should be declared in a file named UpdateCategoryDirections.java
public class UpdateCategoryDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/UpdateFragments/UpdateGoalDetailsDirections 9.java:8: error: class UpdateGoalDetailsDirections is public, should be declared in a file named UpdateGoalDetailsDirections.java
public class UpdateGoalDetailsDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/UpdateFragments/UpdateGoalDetailsDirections 10.java:8: error: class UpdateGoalDetailsDirections is public, should be declared in a file named UpdateGoalDetailsDirections.java
public class UpdateGoalDetailsDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/UpdateFragments/UpdatePlannedPaymentArgs 8.java:13: error: class UpdatePlannedPaymentArgs is public, should be declared in a file named UpdatePlannedPaymentArgs.java
public class UpdatePlannedPaymentArgs implements NavArgs {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/UpdateFragments/UpdateGoalDetailsArgs 8.java:14: error: class UpdateGoalDetailsArgs is public, should be declared in a file named UpdateGoalDetailsArgs.java
public class UpdateGoalDetailsArgs implements NavArgs {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/UpdateFragments/UpdateCurrencyDirections 7.java:9: error: class UpdateCurrencyDirections is public, should be declared in a file named UpdateCurrencyDirections.java
public class UpdateCurrencyDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/UpdateFragments/UpdateTemplateArgs 7.java:13: error: class UpdateTemplateArgs is public, should be declared in a file named UpdateTemplateArgs.java
public class UpdateTemplateArgs implements NavArgs {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/UpdateFragments/UpdatePlannedPaymentArgs 9.java:13: error: class UpdatePlannedPaymentArgs is public, should be declared in a file named UpdatePlannedPaymentArgs.java
public class UpdatePlannedPaymentArgs implements NavArgs {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/UpdateFragments/UpdateGoalDetailsArgs 9.java:14: error: class UpdateGoalDetailsArgs is public, should be declared in a file named UpdateGoalDetailsArgs.java
public class UpdateGoalDetailsArgs implements NavArgs {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/UpdateFragments/UpdateDebtDirections.java:9: error: duplicate class: com.umbrella.budgetapp.Layouts.UpdateFragments.UpdateDebtDirections
public class UpdateDebtDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/UpdateFragments/UpdateGoalSelectDirections 9.java:16: error: class UpdateGoalSelectDirections is public, should be declared in a file named UpdateGoalSelectDirections.java
public class UpdateGoalSelectDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/UpdateFragments/UpdateStoreArgs 7.java:13: error: class UpdateStoreArgs is public, should be declared in a file named UpdateStoreArgs.java
public class UpdateStoreArgs implements NavArgs {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/UpdateFragments/UpdateAccountArgs 7.java:13: error: class UpdateAccountArgs is public, should be declared in a file named UpdateAccountArgs.java
public class UpdateAccountArgs implements NavArgs {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/UpdateFragments/UpdatePlannedPaymentDirections 7.java:9: error: class UpdatePlannedPaymentDirections is public, should be declared in a file named UpdatePlannedPaymentDirections.java
public class UpdatePlannedPaymentDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/UpdateFragments/UpdateUserProfileDirections 8.java:8: error: class UpdateUserProfileDirections is public, should be declared in a file named UpdateUserProfileDirections.java
public class UpdateUserProfileDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/UpdateFragments/UpdateRecordDetailsDirections 9.java:8: error: class UpdateRecordDetailsDirections is public, should be declared in a file named UpdateRecordDetailsDirections.java
public class UpdateRecordDetailsDirections {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/UpdateFragments/UpdateDebtArgs 9.java:13: error: class UpdateDebtArgs is public, should be declared in a file named UpdateDebtArgs.java
public class UpdateDebtArgs implements NavArgs {
^
/Users/XX/Documents/AndroidStudio/Projects/BudgetApp/app/build/generated/source/navigation-args/debug/com/umbrella/budgetapp/Layouts/UpdateFragments/UpdateShoppingListDirections 9.java:9: error: class UpdateShoppingListDirections is public, should be declared in a file named UpdateShoppingListDirections.java
public class UpdateShoppingListDirections {
^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
100 errors
> Task :app:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
go to the menu and choose: Build -> Clean Project, and once done, Build -> Rebuild project
If click Build -> Clean project or Rebuild project cannot fix the issue, there should be another issue lead to build failed. Fix other issue and rebuild could succeed.
Also check if there exists a real BuildConfig file in the package, delete it and try again.
you may have created duplicate java files of same name and kind, check well and delete one.

FlyCapture SDK problems on Visual Studio 2012

I am having problems with the flycapture SDK (FlyCapture v2.6 Rel 2) on Visual Studio. This is used for BlackFly camera.
I am getting the following errors:
Error 1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall FlyCapture2::Error::Error(void)" (__imp_??0Error#FlyCapture2##QAE#XZ) referenced in function _wmain C:\Users\dahl2\Documents\Visual Studio 2012\Projects\BlackFlyMultiTrigger\BlackFlyMultiTrigger\BlackFlyMultiTrigger.obj BlackFlyMultiTrigger
Error 2 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall FlyCapture2::Error::Error(class FlyCapture2::Error const &)" (__imp_??0Error#FlyCapture2##QAE#ABV01##Z) referenced in function _wmain C:\Users\dahl2\Documents\Visual Studio 2012\Projects\BlackFlyMultiTrigger\BlackFlyMultiTrigger\BlackFlyMultiTrigger.obj BlackFlyMultiTrigger
Error 3 error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall FlyCapture2::Error::~Error(void)" (__imp_??1Error#FlyCapture2##UAE#XZ) referenced in function "void __cdecl PrintError(class FlyCapture2::Error)" (?PrintError##YAXVError#FlyCapture2###Z) C:\Users\dahl2\Documents\Visual Studio 2012\Projects\BlackFlyMultiTrigger\BlackFlyMultiTrigger\BlackFlyMultiTrigger.obj BlackFlyMultiTrigger
Error 4 error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual void __thiscall FlyCapture2::Error::PrintErrorTrace(void)const " (__imp_?PrintErrorTrace#Error#FlyCapture2##UBEXXZ) referenced in function "void __cdecl PrintError(class FlyCapture2::Error)" (?PrintError##YAXVError#FlyCapture2###Z) C:\Users\dahl2\Documents\Visual Studio 2012\Projects\BlackFlyMultiTrigger\BlackFlyMultiTrigger\BlackFlyMultiTrigger.obj BlackFlyMultiTrigger
Error 5 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall FlyCapture2::BusManager::BusManager(void)" (__imp_??0BusManager#FlyCapture2##QAE#XZ) referenced in function _wmain C:\Users\dahl2\Documents\Visual Studio 2012\Projects\BlackFlyMultiTrigger\BlackFlyMultiTrigger\BlackFlyMultiTrigger.obj BlackFlyMultiTrigger
Error 6 error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall FlyCapture2::BusManager::~BusManager(void)" (__imp_??1BusManager#FlyCapture2##UAE#XZ) referenced in function _wmain C:\Users\dahl2\Documents\Visual Studio 2012\Projects\BlackFlyMultiTrigger\BlackFlyMultiTrigger\BlackFlyMultiTrigger.obj BlackFlyMultiTrigger
Error 7 error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual class FlyCapture2::Error __thiscall FlyCapture2::BusManager::GetNumOfCameras(unsigned int *)" (__imp_?GetNumOfCameras#BusManager#FlyCapture2##UAE?AVError#2#PAI#Z) referenced in function _wmain C:\Users\dahl2\Documents\Visual Studio 2012\Projects\BlackFlyMultiTrigger\BlackFlyMultiTrigger\BlackFlyMultiTrigger.obj BlackFlyMultiTrigger
Error 8 error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual class FlyCapture2::Error __thiscall FlyCapture2::BusManager::GetCameraFromIndex(unsigned int,class FlyCapture2::PGRGuid *)" (__imp_?GetCameraFromIndex#BusManager#FlyCapture2##UAE?AVError#2#IPAVPGRGuid#2##Z) referenced in function _wmain C:\Users\dahl2\Documents\Visual Studio 2012\Projects\BlackFlyMultiTrigger\BlackFlyMultiTrigger\BlackFlyMultiTrigger.obj BlackFlyMultiTrigger
Error 66 error LNK2001: unresolved external symbol "public: virtual class FlyCapture2::Error __thiscall FlyCapture2::Camera::ValidateFormat7Settings(struct FlyCapture2::Format7ImageSettings const *,bool *,struct FlyCapture2::Format7PacketInfo *)" (?ValidateFormat7Settings#Camera#FlyCapture2##UAE?AVError#2#PBUFormat7ImageSettings#2#PA_NPAUFormat7PacketInfo#2##Z) C:\Users\dahl2\Documents\Visual Studio 2012\Projects\BlackFlyMultiTrigger\BlackFlyMultiTrigger\BlackFlyMultiTrigger.obj BlackFlyMultiTrigger
Error 67 error LNK2001: unresolved external symbol "public: virtual class FlyCapture2::Error __thiscall FlyCapture2::Camera::WaitForBufferEvent(class FlyCapture2::Image *,unsigned int)" (?WaitForBufferEvent#Camera#FlyCapture2##UAE?AVError#2#PAVImage#2#I#Z) C:\Users\dahl2\Documents\Visual Studio 2012\Projects\BlackFlyMultiTrigger\BlackFlyMultiTrigger\BlackFlyMultiTrigger.obj BlackFlyMultiTrigger
Error 68 error LNK2001: unresolved external symbol "public: virtual class FlyCapture2::Error __thiscall FlyCapture2::Camera::WriteRegister(unsigned int,unsigned int,bool)" (?WriteRegister#Camera#FlyCapture2##UAE?AVError#2#II_N#Z) C:\Users\dahl2\Documents\Visual Studio 2012\Projects\BlackFlyMultiTrigger\BlackFlyMultiTrigger\BlackFlyMultiTrigger.obj BlackFlyMultiTrigger
Error 69 error LNK2001: unresolved external symbol "public: virtual class FlyCapture2::Error __thiscall FlyCapture2::Camera::WriteRegisterBlock(unsigned short,unsigned int,unsigned int const *,unsigned int)" (?WriteRegisterBlock#Camera#FlyCapture2##UAE?AVError#2#GIPBII#Z) C:\Users\dahl2\Documents\Visual Studio 2012\Projects\BlackFlyMultiTrigger\BlackFlyMultiTrigger\BlackFlyMultiTrigger.obj BlackFlyMultiTrigger
Error 70 error LNK1120: 69 unresolved externals C:\Users\dahl2\Documents\Visual Studio 2012\Projects\BlackFlyMultiTrigger\Debug\BlackFlyMultiTrigger.exe BlackFlyMultiTrigger
and to my understanding the problem lies in the directories (include and library).
I have downloaded the FlyCapture SDK v2.6 Release 2 for Windows 32-bit and 64-bit.
In my project I have added the following properties:
Configuration Properties -> Linker -> Additional Library Directories : C:\Program Files\Point Grey Research\FlyCapture2\lib64\FlyCapture2_v100.lib
Configuration Properties -> C/C++ -> Additional Include Directories : C:\Program Files\Point Grey Research\FlyCapture2\include
I have tried to do this with the 32-bit and 64-bit SDK and with different lib's. But I don't know where I have done something wrong. All help is appreciated!!!
I have been working on finding the problem, and now I have. The FlyCapture2 SDK is not supported by VS2012 by default. I had to make some changes.
First I added the properties (as written above), but using the 32-bit SDK.
Then I entered the folder where SDK was installed. Here I went to src\vsprops\VS10 and made a copy of the FlyCapture2.props file.
Then I renamed the copy, for example "FlyCapture2Changed.props"
Open the "FlyCapture2Changed.props" (notepad, text editor, etc) and found the line:
NB! there should not be space between < and AdditionalDependencies (same for < / ), had some trouble with the editor here (text went missing).
< AdditionalDependencies>FlyCapture2_$(PlatformToolset).lib;%(AdditionalDependencies)< /AdditionalDependencies>
and changed it to:
< AdditionalDependencies>FlyCapture2_v100.lib;%(AdditionalDependencies)< /AdditionalDependencies>
After this was done I had to do some changes to the project. Under your project you should go to property manager and rightclick on Debug | Win32 and select "Add Existing Property Sheet" and select the "FlyCapture2Changed.props" I have made.
After this was done it worked!

error LNK2005 on an external dll

I am using MS Visual Studio 2012 and trying to use a dynamic linked library that I have not wrote myself. I can define something Foo *foo; and everything is fine until I create a new object using Foo *foo = new Foo( params );
I get a whole list of errors:
1>LIBCMT.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in MSVCRTD.lib(MSVCR110D.dll)
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>cyclone.lib(pworld.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran#_String_base#std##SAXXZ) referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::erase(unsigned int,unsigned int)" (?erase#?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##QAEAAV12#II#Z)
1>cyclone.lib(pfgen.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xran(void)" (?_Xran#_String_base#std##SAXXZ)
1>cyclone.lib(pworld.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen#_String_base#std##SAXXZ) referenced in function "protected: bool __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Grow(unsigned int,bool)" (?_Grow#?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##IAE_NI_N#Z)
1>cyclone.lib(pfgen.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl std::_String_base::_Xlen(void)" (?_Xlen#_String_base#std##SAXXZ)
1>C:\Users\deleo\Documents\Visual Studio 2012\Projects\AdvancedPhysics - Copy\Debug\AdvancedPhysics.exe : fatal error LNK1120: 2 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
So I cannot change any of the code of the dll itself.
I use a single #include (and I looked at the file, if is guarded with an #ifndef).
Anyone knows why this error occurs and how to fix it?
Your project and linked libraries must use the same VC++ version and the same compiler options. You can use PE (Portable Executable) viewer to view linker version to determine what compiler version that used to compile that DLL.
If your compiler version is same as DLL. Try to set Runtime Library in Project > Properties > Configuration Properties > C/C++ > Code Generation to MT or MTd.

Link errors between dialog application and library

I have a dialog application that used to work perfectly. It uses MFC.
I wanted to move some of the classes to a separate library (in the same solution), so I created a new project in the same solution, selected Win32 Console App, Static library and MFC and moved the classes to the new project. The library project seems to compile fine.
In the original project I added a reference to the new library.
I am getting these errors now, no idea how to solve them. If I edit the project properties and select Linker/Input/Ignore All Default Libraries I get much more errors.
1>afxnmcdd.lib(wincore2.obj) : error LNK2005: "void __stdcall DDX_Control(class CDataExchange *,int,class CWnd &)" (?DDX_Control##YGXPAVCDataExchange##HAAVCWnd###Z) already defined in nafxcwd.lib(wincore2.obj)
1>afxnmcdd.lib(wincore2.obj) : error LNK2005: "public: int __thiscall CWnd::ExecuteDlgInit(void *)" (?ExecuteDlgInit#CWnd##QAEHPAX#Z) already defined in nafxcwd.lib(wincore2.obj)
1>afxnmcdd.lib(afxctrlcontainer2.obj) : error LNK2005: "void __cdecl AfxRegisterMFCCtrlClasses(void)" (?AfxRegisterMFCCtrlClasses##YAXXZ) already defined in nafxcwd.lib(afxctrlcontainer2.obj)
1>afxnmcdd.lib(afxctrlcontainer2.obj) : error LNK2005: "protected: void __thiscall CMFCControlContainer::PreUnsubclassControl(class CWnd *)" (?PreUnsubclassControl#CMFCControlContainer##IAEXPAVCWnd###Z) already defined in nafxcwd.lib(afxctrlcontainer2.obj)
1>afxnmcdd.lib(afxctrlcontainer2.obj) : error LNK2005: "public: int __thiscall CMFCControlContainer::SubclassDlgControls(void)" (?SubclassDlgControls#CMFCControlContainer##QAEHXZ) already defined in nafxcwd.lib(afxctrlcontainer2.obj)
1>afxnmcdd.lib(afxctrlcontainer2.obj) : error LNK2005: "public: static int __stdcall CMFCControlContainer::UTF8ToString(char const *,class ATL::CStringT<char,class StrTraitMFC<char,class ATL::ChTraitsCRT<char> > > &,int)" (?UTF8ToString#CMFCControlContainer##SGHPBDAAV?$CStringT#DV?$StrTraitMFC#DV?$ChTraitsCRT#D#ATL#####ATL##H#Z) already defined in nafxcwd.lib(afxctrlcontainer2.obj)
1>.\Debug\application-ui.exe : fatal error LNK1169: one or more multiply defined symbols found
How do I solve this issue?
In your static library go to the STDAFX.H and comment out following preprocessor macro:
#define _AFX_NO_MFC_CONTROLS_IN_DIALOGS

Resources