Comments (16)
Android Studio does not pick up generated sources automatically. Basically you have to change the output directory for generated sources and tell AS that that folder is a source folder.
You might be interested in https://bitbucket.org/hvisser/android-apt or https://github.com/stanfy/gradle-android-apt
from dagger.
It's normal, I don't think the idea looks in the build folder while gradle does.
from dagger.
Use one of the aforementioned plugins.
from dagger.
Alright, thank you! android-apt seems to work for me. Should it maybe be added in the README a heads up for people like myself?
from dagger.
Yes. Documenting Dagger 2 has only just begun.
from dagger.
Please do so we don't have to beg for it on SO 👍
from dagger.
While these plugins work and projects build just right, created classes are not being picked up by IntelliJ so they're marked down as not found, disabling static code checks.
from dagger.
IntelliJ should be able to see the generated types. Take a look at https://github.com/gk5885/dagger-android-sample and see if that configuration works for you.
from dagger.
Android Studio 1.0-RC1
But I was tinkering with it on IntelliJ14 at home over the weekend and it didn't work either.
Project Lombok uses an IDE plugin to circumvent the checks and allow operations on annotated fields, but I don't know if it applies here.
from dagger.
cannot resolve symbol 'Dagger_...' in eclipse too
I configured the annotation processing but it doesn't work
eclipse
Version: Kepler Service Release 1
Build id: 20130919-0819
from dagger.
IntelliJ should be able to see the generated types. Take a look at https://github.com/gk5885/dagger-android-sample and see if that configuration works for you.
I had the same problem with symbols not resolved, but after adding apt plugin as in sample everything worked fine.
I'm using IntelliJ Idea 14.0.2
from dagger.
You can try my sample project https://github.com/mgrzechocinski/dagger2-example
Sample contains retrolambda&lombok configuration as well.
Be aware, that you have to add com.neenbedankt.android-apt
to your project.
from dagger.
Now struggling on IntelliJ :/ Added apt plugin, enabled annotation processor, marked generated folder as source. But i can't really see any generated file
from dagger.
These are very old instructions. You should not be using apt-plugin today, the functionality is built into the android build plugin (using the keyword annotationProcessor instead of apt in dependencies)
from dagger.
@liminal i am not talking about android, i am using dagger for pure java project on IntelliJ
from dagger.
@jemshit Assuming net.ltgt.apt
plugin, make sure you also apply net.ltgt.apt-idea
. I also suggest delegating build/run actions to Gradle in IntelliJ (beware, this is a global setting, not actually per-project) so you don't even have to configure annotation processing in IntelliJ; you should then set idea.module.apt.addAptDependencies = false
. See https://github.com/tbroyer/gradle-apt-plugin#intellij-idea, come discuss at https://github.com/tbroyer/gradle-apt-plugin/issues if you still have issues (though please review previous issues, particularly those labelled as invalid
or question
)
from dagger.
Related Issues (20)
- [KSP] dagger-android unresolved generated subcomponent for internal module methods used across gradle modules HOT 3
- Unable to build with 2.48.1 - 2.49 and 2.50 HOT 2
- KSP processing does not see member injections from typealiased superclass in 2.50 HOT 2
- Regression "warning: [cast] redundant cast to Map" when updating from 2.49 to 2.50 HOT 1
- Dagger-Hilt 2.49: Activity onCreate() and onDestroy() code is generated, but our base Activity class has these final HOT 3
- Dagger 2.50 produces code that calls deprecated method HOT 1
- Feature Request: lint rule for EarlyAccessPoint classes to prevent @Inject abuse HOT 13
- no
- Feature request: Add support for K2 compiler. HOT 2
- @HiltViewModel Unit test problem. HOT 2
- WorkerAssistedFactories are not created on APK builds HOT 5
- Getting `Unexpected annotation value: TransformedVisibilityMarker` error during unit test HOT 5
- @BindsInstance on Component.Factory supertype lambda parameters HOT 1
- SecurityException when trying to run UI test with hilt and Jetpack Compose on Android 14 HOT 3
- BadParcelableException in Activity onCreate HOT 3
- Dagger 2.50 KSP fails to generate field in implementation for a @Named field HOT 2
- Conflicting documentation for dagger.android and Hilt optional inject HOT 3
- [KSP] dagger-android hanging indefinitely on a large multi module project HOT 2
- Optional bindings in a parent component can sometimes use bindings from child components HOT 2
- NullPointerException dagger.spi.shaded.androidx.room.compiler.processing.XTypeElement.getAnnotation HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dagger.