New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dagger 2 / DialogFragment / appcompat-v7:22.2.0 causes "cannot access DialogStyle" #197
Comments
I'm seeing this issue as well :-\ |
I am getting the same results with my dialogs. |
It seems that this might be a AppCompat issue... there seems to be similar discussions about this same issue with other annotation processing libraries: androidannotations/androidannotations#1435 and |
I just found a TEMPORARY workaround... till appcompat fixes this issue:
android.support.v4.app
DialogFragment$DialogStyle.java
// todo remove this file when fixed in appcompat (https://code.google.com/p/android/issues/detail?id=175086) |
@jeffdcamp You're proposed solution doesn't seem to work for me I now get the following error: An exception has occurred in the compiler (1.8.0_40). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you. |
@marcoRS Interesting.... I have applied this work-around to 4 different projects and verified that these projects compile correctly on several machines... I compile with java 8 on one machine and java 7 on another machine.... |
Same issue with @jeffdcamp Is updating jre etc helpful? |
Getting the same error as @marcoRS |
+1. Got the same error as @marcoRS |
same error as @marcoRS |
@marcoRS, @RobertoArtiles, @malroy89 , @AlexanderThiele I found another work-around.... a bit more ugly... but has gotten us around this issue (including the NPE on the above work-around) till appcompat 22.2 is fixed.
android.support.v4.app
|
@jeffdcamp Thanks for the workaround. I however had to change every class that extended from DialogFragment, not just the classes that used @Inject |
It was fixed on Android Support 22.2.1. |
Fixed |
I don't know if this is an issue with Dagger 2.0 or Android AppCompat....
We are using android.support.v4.app.DialogFragment and Dagger 2. When switching from appcompat-v7:22.1.0 to appcompat-v7:22.2.0 Dagger annotation processor causes the following error:
===== Gradle log =====
:processDebugJavaRes UP-TO-DATE
:compileDebugJavaWithJavac
error: cannot access DialogStyle
class file for android.support.v4.app.DialogFragment$DialogStyle not found
Consult the following stack trace for details.
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for android.support.v4.app.DialogFragment$DialogStyle not found
1 error
:compileDebugJavaWithJavac FAILED
Very Simple Sample Code which causes the error:
===== TestFragment.java =====
import android.support.v4.app.DialogFragment;
import org.company.project.Prefs;
import javax.inject.Inject;
public class TestFragment extends DialogFragment {
@Inject
Prefs prefs;
}
===== AppComponent.java =====
import org.company.project.ui.TestFragment;
import javax.inject.Singleton;
import dagger.Component;
@singleton
@component(modules = AppModule.class)
public interface AppComponent {
void inject(TestFragment target);
}
The text was updated successfully, but these errors were encountered: