Currently i am trying to upgrade my project into the android x but before that i was done the gradle wrapper 4.10.1 and tools.build:gradle:3.2.0 but i am getting the following error and all my code in java only.
Anybody knows how will resolve these kind of issues.
> Task :app:dataBindingGenBaseClassesProjectMDebug
> Task :app:compileProjectMDebugJavaWithJavac FAILED
E:\SVN\Hindi_v_28_Final_AndroidX\BM-6.3_v28\app\build\generated\data_binding_base_class_source_out\ProjectMDebug\dataBindingGenBaseClassesProjectMDebug\out\com\ProjectMs\databinding\ActivityAddDetailPopupBinding.java:16: error: cannot find symbol
import com.ProjectMs.viewmodel.AddDetail;
^
symbol: class AddDetail
location: package com.ProjectMs.viewmodel
E:\SVN\Hindi_v_28_Final_AndroidX\BM-6.3_v28\app\build\generated\data_binding_base_class_source_out\ProjectMDebug\dataBindingGenBaseClassesProjectMDebug\out\com\ProjectMs\databinding\ActivityAddDetailPopupBinding.java:129: error: package AddDetail does not exist
protected AddDetail.AddDetailViewModel mViewModel;
^
E:\SVN\Hindi_v_28_Final_AndroidX\BM-6.3_v28\app\build\generated\data_binding_base_class_source_out\ProjectMDebug\dataBindingGenBaseClassesProjectMDebug\out\com\ProjectMs\databinding\ActivityAddDetailPopupBinding.java:183: error: package AddDetail does not exist
public abstract void setViewModel(#Nullable AddDetail.AddDetailViewModel viewModel);
In Android Plugin 3.2.0 and above, the databinding V2 is enabled by default. I guess the databinding V2 compiler treats any component that starts with an upper case letter as a class, not a package
After change the lower case its works well like "adddetail" instead of "AddDetail".
import com.ProjectMs.viewmodel.adddetail;
Thanks. Refer url
Gradle Plugin 3.2.0 with databinding, can not resolve package name
Related
I am using IntelliJ.
I have added the JAR - https://mvnrepository.com/artifact/org.glassfish.jersey.core/jersey-client/2.0-m04
To my project,
{{ import org.glassfish.jersey.client.JerseyClientBuilder; }}
despite this I still get a compile error .
Error:(3, 35) java: cannot find symbol
symbol: class JerseyClientBuilder
location: package org.glassfish.jersey.client
I did have a lot of errors due to missing JARS , but I just found them on the web and added them to the project under project structure and that sorted all the errors except for the jersey Client Builder ...
I have a Intellij plugin project that I can successfully build without using the PsiMethod class. I've generated this project using this intellij plugin guide
As soon as I add in code using PsiMethod class
(from the Intellij SDK code_samples directory)
The intellisense cannot find any GOTO information for the class.
I can then switch my project settings module from JAVA_1.8.0 to
by adding it into the platform settings SDKs:
This now adds intellisense, and gives me the ability to navigate to the PsiMethod class by CMD+click.
However, If I try and run my "plugin" gradle configratuion. it halts with an error running :runIde.
Running compileJava command from bash I get:
$ ./gradlew compileJava
> Task :compileJava FAILED
/Users/cody/IdeaProjects/plugintest/src/main/java/com/plugintest/TestClass.java:104: error: cannot find symbol
PsiMethod containingMethod = PsiTreeUtil.getParentOfType(element, PsiMethod.class);
^
symbol: class PsiMethod
location: class ParticleContainerManager
/Users/cody/IdeaProjects/plugintest/src/main/java/com/plugintest/TestClass.java:104: error: cannot find symbol
PsiMethod containingMethod = PsiTreeUtil.getParentOfType(element, PsiMethod.class);
^
symbol: class PsiMethod
location: class ParticleContainerManager
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors
The gradle source sets in intellij are as follows:
And when I CMD+Click the PsiMethod class, it shows the following JAR source:
This source is in the following parent folder:
How can I add this source into my gradle configuration? shouldn't it be autodetecting what my projects intellisense is tapping into?
Do I need to change something in the gradle.* files inside the project directory?
EDIT:
Using Yann's Answer:
I've added the following line to my build.gradle file:
intellij {
version '2019.2'
plugins 'java'
}
and it works!
Please make sure to add Java plugin as separate dependency. This is now necessary starting with 2019.2: https://blog.jetbrains.com/platform/2019/06/java-functionality-extracted-as-a-plugin/
I tried to build a demo app of Ad Serving for App developers.
I download Android studio through http://developer.android.com/sdk/index.html .
However, I got a lot error like
Error: (3,19) java: package android.app does not exist
Error: (4,18) java: package android.os does not exist
Error: (5,20) java: package android.view does not exist
Error: (6,25) java: package android.view.View does not exist
Error: (7,20) java: package android.view does not exist
Error: (8,22) java: package android.widget does not exist
.....
I use original code from http://openx.com/product/mobile-ad-serving-for-app-developers/ without doing any modifications.
I tried Android API 19 and 21 Platform through Project Structure but in vain.
It seems the solution is very simple. However, I cannot solve it until now.
I have a Spring application that i did not started to build, these dudes made it old school way without maven or gradle support in eclipse.
I want to work on it in IntelliJ Idea, importing the project gives me the following errors:
Idea Event Log:
12:13:36 PM Unknown Natures Detected
Imported projects contain unknown natures:
org.eclipse.wst.common.modulecore.ModuleCoreNature
org.eclipse.wst.jsdt.core.jsNature
org.eclipse.jem.workbench.JavaEMFNature
org.eclipse.wst.common.project.facet.core.nature
Some settings may be lost after import.
Also when trying to build:
/home/.../src/com/.../controller/servlet/VideoServlet.java
Error:(7, 32) java: package javax.servlet.annotation does not exist
Error:(13, 2) java: cannot find symbol
symbol: class WebServlet
/home/.../src/com/.../service/CustomUserDetailsService.java
Warning:(10, 51) java: org.springframework.security.core.authority.GrantedAuthorityImpl in org.springframework.security.core.authority has been deprecated
/home/ldurazo/git/arcofi/arcofi/src/com/arcofi/controller/FileDownloadController.java
Error:(35, 40) java: cannot find symbol
symbol: method getServletContext()
location: variable request of type javax.servlet.http.HttpServletRequest
I have the library servlet-api2.3.jar
And in the project structure i have the following problems
Module project : invalid item 'org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v7.0' in the dependencies list
Module project : invalid item 'org.eclipse.jst.j2ee.internal.web.container' in the dependencies list
Module project : invalid item 'org.eclipse.jst.j2ee.internal.module.container' in the dependencies list
And last, in project structure too:
Unknown facet type: 'Spring'
Unknow facet type 'Web'
I am using IntelliJ Idea 14 and Eclipse Luna
I'm trying to import ActionBarSherlock (ABS) into my Android app using Gradle, but unfortunately, when building I get a list of errors saying:
/Users/kramer65/dev/repos/android-official/OurPackage/build/res/all/debug/values/values.xml:248: error: Attribute "titleTextStyle" has already been defined
/Users/kramer65/dev/repos/android-official/OurPackage/build/res/all/debug/values/values.xml:250: error: Attribute "subtitleTextStyle" has already been defined
/Users/kramer65/dev/repos/android-official/OurPackage/build/res/all/debug/values/values.xml:256: error: Attribute "divider" has already been defined
/Users/kramer65/dev/repos/android-official/OurPackage/build/res/all/debug/values/values.xml:258: error: Attribute "background" has already been defined
[etc. etc.]
* What went wrong:
Execution failed for task ':processDebugResources'.
> Could not call IncrementalTask.taskAction() on task ':processDebugResources'
I'm trying to import ABS using the following in build.gradle:
dependencies {
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0#aar'
compile 'com.android.support:support-v4:18.0.+'
compile 'com.google.android.gms:play-services:4.0.30'
instrumentTestCompile(files('libs/espresso-1.0-SNAPSHOT-bundled.jar'))
}
and in my settings.gradle I've got the following line:
include ':OurPackage', ':Libraries:ActionBarSherlock'
Does anybody know what I'm doing wrong? All tips are welcome!
The same attributes titleTextStyle, subtitleTextStyle, divider, background are defined in 2 different libraries.
The 'com.actionbarsherlock:actionbarsherlock:4.4.0#aar' and the support library 'com.android.support:support-v4:18.0.+' which introduced the v7 appcompat library can't work together.