草庐IT

annotation

全部标签

android - 使用 Android Studio(测试版)0.8.4 配置 Android Annotations v3.0.1

配置Android注释非常麻烦。但我终于想出了一个解决办法,想和大家分享一下。 最佳答案 Usethebelowmentionedgradlebuildscript.Followingaresomeofthereferences:1)https://github.com/excilys/androidannotations/blob/develop/examples/gradle/build.gradle2)https://bitbucket.org/hvisser/android-apt3)http://www.jayway.co

android - com.android.dex.DexException : Multiple dex files define Landroid/support/annotation/AnimRes;

您好,我正在使用AndroidStudio开发一个项目。我已经设置了所有内容,但是当我运行我的项目时,我遇到了以下错误。最近两天我无法解决它。我的项目中可能是什么问题导致了这个错误请知道的friend帮忙应用构建.gradleapplyplugin:'com.android.application'android{compileSdkVersion22buildToolsVersion"21.1.2"defaultConfig{applicationId"in.xyz"minSdkVersion15targetSdkVersion22versionCode1versionName"1.

java:com.baomidou.mybatisplus.annotation不存在

一、问题:在更新了Kotlin之后,Service层rebulid时,爆红出现了以下但不限于:java:com.baomidou.mybatisplus.annotation不存在的错误二、解决:委托delegatemaven来管理IDE的编译和运行

java - Dagger2 "cannot be provided without an @Provides-annotated method."问题

我正在尝试使用Dagger2设置一个新项目,我以前使用过Dagger2,但现在我正在尝试自己从头开始设置它。我正在从我参与的Kotlin项目中获取示例,但无法像现在在Kotlin中一样为Java设置它(或者我可能遗漏了一些东西)。它只是一个组件、一个模块和一个应用程序。组件@Singleton@Component(modules={MainAppModule.class})publicinterfaceAppComponentextendsAndroidInjector{@Component.BuilderabstractclassBuilderimplementsAndroidInj

android - 让 Android Studio、Gradle 和 Android Annotations 协同工作

既然我已经决定在AndroidStudio中使用AndroidAnnotations,我想通过Gradle来实现它。经过深思熟虑的研究后,我发现根据androidstudio、gradle或android注释的版本,有通过Gradle实现Android注释的新旧方法。我来到这个有用的教程->http://www.jayway.com/2014/02/21/androidannotations-setup-in-android-studio/,并尝试首先使用新的“android-L”作为目标SDK来实现这一点targetSDKversion"android-L"+compileSdkVe

android - 包 android.support.annotation 不存在

我的gradle代码applyplugin:'com.android.application'android{compileSdkVersion28defaultConfig{applicationId"gt.otomat7"minSdkVersion22targetSdkVersion28versionCode1versionName"1.0"testInstrumentationRunner"android.support.test.runner.AndroidJUnitRunner"}buildTypes{release{minifyEnabledfalseproguardFil

java - ArrayStoreException : sun. reflect.annotation.TypeNotPresentExceptionProxy 安卓 PowerMock JUnit

我正在使用PowerMock和Mockito来测试静态函数,如下所示。它过去一直运行良好,直到今天它抛出了下面提到的这个异常。//thistestcaseneedtomockstaticmethodssoitusesPowerMock@RunWith(PowerMockRunner.class)//thisstaticmethodstobemockedareonEnvironmentsothatmustbe'prepared'@PrepareForTest({Environment.class,Build.class,Build.VERSION.class})publicclassFi

No qualifying bean of type ‘org.springframework.web.servlet.config.annotation.PathMatchConfigurer‘ a

如果在Spring应用程序中出现“Noqualifyingbeanoftype'org.springframework.web.servlet.config.annotation.PathMatchConfigurer'available”错误,可能是因为没有正确地配置PathMatchConfigurer对象。要解决此问题,可以尝试添加一个实现了WebMvcConfigurer接口的类,并重写configurePathMatch()方法。在该方法内部,我们可以调用addPathPrefix()等方法来修改PathMatchConfigurer对象。以下是一个示例代码:javaCopycode

java - Dagger 2 : Cannot be provided without an @Provides-annotated method

我刚开始学习dagger2,遇到了一个奇怪的问题,在我看来像是一个错误。这是模块:@ModulepublicclassSimpleModule{@ProvidesCookerproviderCooker(){returnnewCooker("tom","natie");}}组件:@Component(modules=SimpleModule.class)publicinterfaceSimpleComponent{voidinject(DaggerTestActivityactivity);}接口(interface):publicinterfaceCoffeeMaker{String

android - 支持升级到Android Studio 3.0后Annotation不存在

将我的项目升级到AndroidStudio3.0-beta1后,我的androidTest文件停止编译。很多包都没有找到,其中一些是:error:packageandroid.support.annotationdoesnotexisterror:cannotfindsymbolclassStringReserror:cannotaccessAppCompatActivityclassfileforandroid.support.v7.app.AppCompatActivitynotfound我已经添加了androidTestCompile"com.android.support:su