- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在努力将一个项目迁移到 Android Studio/Gradle,但我在使用 Android Annotations 正确构建项目时遇到了一些问题。从 gradle 控制台输出来看,注释处理似乎是在编译后发生的?那正确吗?不应该发生在之前吗?奇怪的是,如果我点击运行,“编辑配置”对话框底部会出现“错误:未找到默认 Activity ”。
我有另一个项目使用一个非常相似的 build.gradle 文件,它运行良好,我完全被这个项目难住了。任何帮助将不胜感激!
请注意,我还尝试了各种其他方法,包括 https://github.com/excilys/androidannotations/wiki/Building-Project-Gradle但结果没有区别。
我在项目根目录下的build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.7.+'
}
}
allprojects {
repositories {
mavenCentral()
}
}
还有我的/android 文件夹中的 build.gradle:
apply plugin: 'android'
ext.androidAnnotationsVersion = '2.7.1';
configurations {
apt
}
android {
compileSdkVersion 19
buildToolsVersion "19.0.1"
defaultConfig {
minSdkVersion 9
targetSdkVersion 19
}
buildTypes {
release {
runProguard false
}
}
productFlavors {
defaultFlavor {
proguardFile 'proguard-rules.txt'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'LICENSE'
exclude 'NOTICE'
}
}
dependencies {
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
compile 'com.fasterxml.jackson.core:jackson-core:2.2.0'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.2.0'
compile 'com.fasterxml.jackson.core:jackson-databind:2.2.0'
compile 'org.springframework.android:spring-android-core:1.0.1.RELEASE'
compile 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE'
apt "com.googlecode.androidannotations:androidannotations:${androidAnnotationsVersion}"
compile "com.googlecode.androidannotations:androidannotations-api:${androidAnnotationsVersion}"
compile "com.nostra13.universalimageloader:universal-image-loader:1.9.0"
compile fileTree(dir: 'libs', include: '*.jar')
}
android.applicationVariants.all { variant ->
aptOutput = file("${project.buildDir}/source/apt_generated/${variant.dirName}")
println "****************************"
println "variant: ${variant.name}"
println "manifest: ${variant.processResources.manifestFile}"
println "aptOutput: ${aptOutput}"
println "****************************"
variant.javaCompile.doFirst {
println "*** compile doFirst ${variant.name}"
aptOutput.mkdirs()
variant.javaCompile.options.compilerArgs += [
'-processorpath', configurations.apt.getAsPath(),
'-AandroidManifestFile=' + variant.processResources.manifestFile,
'-s', aptOutput
]
}
}
这是我的 gradle 控制台输出:
Executing tasks: [clean, :android:assembleDefaultFlavorDebug]
Creating properties on demand (a.k.a. dynamic properties) has been deprecated and is scheduled to be removed in Gradle 2.0. Please read http://gradle.org/docs/current/dsl/org.gradle.api.plugins.ExtraPropertiesExtension.html for information on the replacement for dynamic properties.
Deprecated dynamic property: "aptOutput" on "com.android.build.gradle.internal.api.ApplicationVariantImpl_Decorated@2b8bd36f", value: "/Users/marky/myapp...".
****************************
variant: defaultFlavorDebug
manifest: /Users/marky/myapp Android/android/build/manifests/defaultFlavor/debug/AndroidManifest.xml
aptOutput: /Users/marky/myapp Android/android/build/source/apt_generated/defaultFlavor/debug
****************************
Deprecated dynamic property "aptOutput" created in multiple locations.
****************************
variant: defaultFlavorRelease
manifest: /Users/marky/myapp Android/android/build/manifests/defaultFlavor/release/AndroidManifest.xml
aptOutput: /Users/marky/myapp Android/android/build/source/apt_generated/defaultFlavor/release
****************************
:android:clean UP-TO-DATE
:android:compileDefaultFlavorDebugNdk
:android:preBuild UP-TO-DATE
:android:preDefaultFlavorDebugBuild UP-TO-DATE
:android:preDefaultFlavorReleaseBuild UP-TO-DATE
:android:prepareComActionbarsherlockActionbarsherlock440Library
:android:prepareDefaultFlavorDebugDependencies
:android:compileDefaultFlavorDebugAidl
:android:compileDefaultFlavorDebugRenderscript
:android:generateDefaultFlavorDebugBuildConfig
:android:mergeDefaultFlavorDebugAssets
:android:mergeDefaultFlavorDebugResources
:android:processDefaultFlavorDebugManifest
:android:processDefaultFlavorDebugResources
:android:generateDefaultFlavorDebugSources
:android:compileDefaultFlavorDebugJava
*** compile doFirst defaultFlavorDebug
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/SLAudioPlayer.java:32: cannot find symbol
symbol : class AudioPlayerActivity_
location: package com.mycompany.sl.ui
import com.mycompany.sl.ui.AudioPlayerActivity_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/SLAudioPlayer.java:33: cannot find symbol
symbol : class SplashActivity_
location: package com.mycompany.sl.ui
import com.mycompany.sl.ui.SplashActivity_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/SLAudioPlayer.java:34: cannot find symbol
symbol : class TabHostFragmentActivity_
location: package com.mycompany.sl.ui
import com.mycompany.sl.ui.TabHostFragmentActivity_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/model/Chapter.java:11: cannot find symbol
symbol : class SLPreferences_
location: package com.mycompany.sl
import com.mycompany.sl.SLPreferences_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/Application.java:23: cannot find symbol
symbol : class DownloadListActivity_
location: package com.mycompany.sl.ui.download
import com.mycompany.sl.ui.download.DownloadListActivity_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/api/SLRestClient.java:32: cannot find symbol
symbol : class TabHostFragmentActivity_
location: package com.mycompany.sl.ui
import com.mycompany.sl.ui.TabHostFragmentActivity_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/Application.java:56: cannot find symbol
symbol : class SLPreferences_
location: class com.mycompany.sl.Application
public SLPreferences_ prefs;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/AudioPlayerActivity.java:31: cannot find symbol
symbol : class AddBookmarkActivity_
location: package com.mycompany.sl.ui.bookmark
import com.mycompany.sl.ui.bookmark.AddBookmarkActivity_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/AudioPlayerActivity.java:32: cannot find symbol
symbol : class TranscriptActivity_
location: package com.mycompany.sl.ui.transcript
import com.mycompany.sl.ui.transcript.TranscriptActivity_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/LoginActivity.java:35: cannot find symbol
symbol : class SLPreferences_
location: package com.mycompany.sl
import com.mycompany.sl.SLPreferences_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/LoginActivity.java:99: cannot find symbol
symbol : class SLPreferences_
location: class com.mycompany.sl.ui.LoginActivity
SLPreferences_ preference;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/ProductViewFragment.java:12: cannot find symbol
symbol : class VolumeActivity_
location: package com.mycompany.sl.ui.volume
import com.mycompany.sl.ui.volume.VolumeActivity_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/SettingsActivity.java:10: cannot find symbol
symbol : class SLPreferences_
location: package com.mycompany.sl
import com.mycompany.sl.SLPreferences_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/SettingsActivity.java:11: cannot find symbol
symbol : class DownloadListActivity_
location: package com.mycompany.sl.ui.download
import com.mycompany.sl.ui.download.DownloadListActivity_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/SettingsActivity.java:12: cannot find symbol
symbol : class FAQActivity_
location: package com.mycompany.sl.ui.faq
import com.mycompany.sl.ui.faq.FAQActivity_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/nowplayingbaseclasses/NowPlayingActivity.java:10: cannot find symbol
symbol : class AudioPlayerActivity_
location: package com.mycompany.sl.ui
import com.mycompany.sl.ui.AudioPlayerActivity_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/SettingsActivity.java:28: cannot find symbol
symbol : class SLPreferences_
location: class com.mycompany.sl.ui.SettingsActivity
SLPreferences_ preference;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/nowplayingbaseclasses/NowPlayingButton.java:16: cannot find symbol
symbol : class AudioPlayerActivity_
location: package com.mycompany.sl.ui
import com.mycompany.sl.ui.AudioPlayerActivity_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/SettingsAdapter.java:19: cannot find symbol
symbol : class SLPreferences_
location: package com.mycompany.sl
import com.mycompany.sl.SLPreferences_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/SplashActivity.java:40: package TabHostFragmentActivity_ does not exist
void launchMainActivity(TabHostFragmentActivity_.IntentBuilder_ builder){
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/StudyLogFragment.java:18: cannot find symbol
symbol : class StudyProgressProductAcitivty_
location: package com.mycompany.sl.ui.studyprogress.product
import com.mycompany.sl.ui.studyprogress.product.StudyProgressProductAcitivty_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/StudyTimelineActivity.java:18: cannot find symbol
symbol : class StudyTimelineHeaderView_
location: package com.mycompany.sl.ui.weeklyhistory
import com.mycompany.sl.ui.weeklyhistory.StudyTimelineHeaderView_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/StudyTimelineActivity.java:20: cannot find symbol
symbol : class WeeklyHistoryItemView_
location: package com.mycompany.sl.ui.weeklyhistory
import com.mycompany.sl.ui.weeklyhistory.WeeklyHistoryItemView_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/nowplayingbaseclasses/NowPlayingListActivity.java:10: cannot find symbol
symbol : class AudioPlayerActivity_
location: package com.mycompany.sl.ui
import com.mycompany.sl.ui.AudioPlayerActivity_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/TabHostFragmentActivity.java:18: cannot find symbol
symbol : class SLPreferences_
location: package com.mycompany.sl
import com.mycompany.sl.SLPreferences_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/TabHostFragmentActivity.java:22: cannot find symbol
symbol : class BookmarkFragment_
location: package com.mycompany.sl.ui.bookmark
import com.mycompany.sl.ui.bookmark.BookmarkFragment_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/nowplayingbaseclasses/NowPlayingSherlockFragmentActivity.java:10: cannot find symbol
symbol : class AudioPlayerActivity_
location: package com.mycompany.sl.ui
import com.mycompany.sl.ui.AudioPlayerActivity_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/TabHostFragmentActivity.java:42: cannot find symbol
symbol : class SLPreferences_
location: class com.mycompany.sl.ui.TabHostFragmentActivity
SLPreferences_ preference;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/bookmark/BookmarkFragment.java:28: cannot find symbol
symbol : class AudioPlayerActivity_
location: package com.mycompany.sl.ui
import com.mycompany.sl.ui.AudioPlayerActivity_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/chapter/ChapterListFragment.java:25: cannot find symbol
symbol : class SLPreferences_
location: package com.mycompany.sl
import com.mycompany.sl.SLPreferences_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/chapter/ChapterListFragment.java:30: cannot find symbol
symbol : class AudioPlayerActivity_
location: package com.mycompany.sl.ui
import com.mycompany.sl.ui.AudioPlayerActivity_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/chapter/ChapterListFragment.java:48: cannot find symbol
symbol : class SLPreferences_
location: class com.mycompany.sl.ui.chapter.ChapterListFragment
SLPreferences_ preferences;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/chapter/ChapterListItem.java:11: cannot find symbol
symbol : class TranscriptActivity_
location: package com.mycompany.sl.ui.transcript
import com.mycompany.sl.ui.transcript.TranscriptActivity_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/studyprogress/StudyProgressActivity.java:15: cannot find symbol
symbol : class WeeklyHistoryItemView_
location: package com.mycompany.sl.ui.weeklyhistory
import com.mycompany.sl.ui.weeklyhistory.WeeklyHistoryItemView_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/studyprogress/chapter/StudyProgressChapterActivity.java:16: cannot find symbol
symbol : class AudioPlayerActivity_
location: package com.mycompany.sl.ui
import com.mycompany.sl.ui.AudioPlayerActivity_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/studyprogress/chapter/StudyProgressChapterActivity.java:18: cannot find symbol
symbol : class StudyProgressProductItemView_
location: package com.mycompany.sl.ui.studyprogress.product
import com.mycompany.sl.ui.studyprogress.product.StudyProgressProductItemView_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/studyprogress/chapter/StudyProgressChapterActivity.java:20: cannot find symbol
symbol : class StudyProgressVolumeItemView_
location: package com.mycompany.sl.ui.studyprogress.volume
import com.mycompany.sl.ui.studyprogress.volume.StudyProgressVolumeItemView_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/studyprogress/product/StudyProgressProductAcitivty.java:17: cannot find symbol
symbol : class StudyProgressVolumeActivity_
location: package com.mycompany.sl.ui.studyprogress.volume
import com.mycompany.sl.ui.studyprogress.volume.StudyProgressVolumeActivity_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/studyprogress/volume/StudyProgressVolumeActivity.java:15: cannot find symbol
symbol : class StudyProgressChapterActivity_
location: package com.mycompany.sl.ui.studyprogress.chapter
import com.mycompany.sl.ui.studyprogress.chapter.StudyProgressChapterActivity_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/studyprogress/volume/StudyProgressVolumeActivity.java:17: cannot find symbol
symbol : class StudyProgressProductItemView_
location: package com.mycompany.sl.ui.studyprogress.product
import com.mycompany.sl.ui.studyprogress.product.StudyProgressProductItemView_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/videoproduct/VideoProductFragment.java:13: cannot find symbol
symbol : class VideoContentActivity_
location: package com.mycompany.sl.ui
import com.mycompany.sl.ui.VideoContentActivity_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/volume/VolumeActivity.java:12: cannot find symbol
symbol : class PDFProductFragment_
location: package com.mycompany.sl.ui.pdf
import com.mycompany.sl.ui.pdf.PDFProductFragment_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/volume/VolumeActivity.java:14: cannot find symbol
symbol : class VideoProductFragment_
location: package com.mycompany.sl.ui.videoproduct
import com.mycompany.sl.ui.videoproduct.VideoProductFragment_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/volume/VolumeFragment.java:12: cannot find symbol
symbol : class ChapterActivity_
location: package com.mycompany.sl.ui.chapter
import com.mycompany.sl.ui.chapter.ChapterActivity_;
^
/Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/ui/volume/VolumeItemView.java:22: cannot find symbol
symbol : class ChapterActivity_
location: package com.mycompany.sl.ui.chapter
import com.mycompany.sl.ui.chapter.ChapterActivity_;
^
Note: Starting AndroidAnnotations annotation processing
Note: AndroidManifest.xml file found: /Users/marky/myapp Android/android/build/manifests/defaultFlavor/debug/AndroidManifest.xml
Note: Number of files generated by AndroidAnnotations: 74
Note: Generating source file: com.mycompany.sl.util.SLUtils_
Note: Generating source file: com.mycompany.sl.ui.videoproduct.VideoProductFragment_
Note: Generating source file: com.mycompany.sl.ui.videoproduct.VideoProductItemView_
Note: Generating source file: com.mycompany.sl.ui.videoproduct.VideoProductListAdapter_
Note: Generating source file: com.mycompany.sl.ui.chapter.ChapterActivity_
Note: Generating source file: com.mycompany.sl.ui.chapter.ChapterListAdapter_
Note: Generating source file: com.mycompany.sl.ui.chapter.ChapterListFragment_
Note: Generating source file: com.mycompany.sl.ui.chapter.ChapterListItem_
Note: Generating source file: com.mycompany.sl.ui.studyprogress.product.StudyProgressProductAcitivty_
Note: Generating source file: com.mycompany.sl.ui.studyprogress.product.StudyProgressProductItemView_
Note: Generating source file: com.mycompany.sl.SLPreferences_
Note: Generating source file: com.mycompany.sl.Application_
Note: Generating source file: com.mycompany.sl.ui.nowplayingbaseclasses.NowPlayingButton_
Note: Generating source file: com.mycompany.sl.ui.nowplayingbaseclasses.NowPlayingListFragment_
Note: Generating source file: com.mycompany.sl.ui.nowplayingbaseclasses.NowPlayingSherlockFragmentActivity_
Note: Generating source file: com.mycompany.sl.ui.studylog.SLNumberPicker_
Note: Generating source file: com.mycompany.sl.ui.studylog.StudyTargetPicker_
Note: Generating source file: com.mycompany.sl.ui.studyprogress.chapter.StudyProgressChapterActivity_
Note: Generating source file: com.mycompany.sl.ui.studyprogress.chapter.StudyProgressChapterItemView_
Note: Generating source file: com.mycompany.sl.model.SubProduct_
Note: Generating source file: com.mycompany.sl.model.Volume_
Note: Generating source file: com.mycompany.sl.ui.faq.FAQActivity_
Note: Generating source file: com.mycompany.sl.ui.faq.FAQGroupItemView_
Note: Generating source file: com.mycompany.sl.ui.faq.FAQItemActivity_
Note: Generating source file: com.mycompany.sl.ui.faq.FAQItemItemView_
Note: Generating source file: com.mycompany.sl.ui.weeklyhistory.StudyTimelineHeaderView_
Note: Generating source file: com.mycompany.sl.ui.weeklyhistory.WeeklyHistoryDayView_
Note: Generating source file: com.mycompany.sl.ui.weeklyhistory.WeeklyHistoryItemView_
Note: Generating source file: com.mycompany.sl.ui.weeklyhistory.WeeklyHistoryView_
Note: Generating source file: com.mycompany.sl.ui.volume.VolumeActivity_
Note: Generating source file: com.mycompany.sl.ui.volume.VolumeAdapter_
Note: Generating source file: com.mycompany.sl.ui.volume.VolumeFragment_
Note: Generating source file: com.mycompany.sl.ui.volume.VolumeItemView_
Note: Generating source file: com.mycompany.sl.ui.transcript.TranscriptActivity_
Note: Generating source file: com.mycompany.sl.ui.transcript.TranscriptCaptionItemView_
Note: Generating source file: com.mycompany.sl.ui.transcript.TranscriptCharacterItemView_
Note: Generating source file: com.mycompany.sl.ui.transcript.TranscriptHeaderView_
Note: Generating source file: com.mycompany.sl.ui.transcript.TranscriptNarrationItemView_
Note: Generating source file: com.mycompany.sl.ui.pdf.PDFItemView_
Note: Generating source file: com.mycompany.sl.ui.pdf.PDFProductAdapter_
Note: Generating source file: com.mycompany.sl.ui.pdf.PDFProductFragment_
Note: Generating source file: com.mycompany.sl.ui.AudioPlayerActivity_
Note: Generating source file: com.mycompany.sl.ui.LoginActivity_
Note: Generating source file: com.mycompany.sl.ui.LozengeTabIndicator_
Note: Generating source file: com.mycompany.sl.ui.PhoneProductFragment_
Note: Generating source file: com.mycompany.sl.ui.PhoneProductHeaderView_
Note: Generating source file: com.mycompany.sl.ui.PlayerFragment_
Note: Generating source file: com.mycompany.sl.ui.ProductFragment_
Note: Generating source file: com.mycompany.sl.ui.ProductTabFragment_
Note: Generating source file: com.mycompany.sl.ui.ProductViewFragment_
Note: Generating source file: com.mycompany.sl.ui.SLTabView_
Note: Generating source file: com.mycompany.sl.ui.SettingsActivity_
Note: Generating source file: com.mycompany.sl.ui.SettingsAdapter_
Note: Generating source file: com.mycompany.sl.ui.SplashActivity_
Note: Generating source file: com.mycompany.sl.ui.StudyLogFragment_
Note: Generating source file: com.mycompany.sl.ui.StudyTargetActivity_
Note: Generating source file: com.mycompany.sl.ui.StudyTimelineActivity_
Note: Generating source file: com.mycompany.sl.ui.TabHostFragmentActivity_
Note: Generating source file: com.mycompany.sl.ui.VideoContentActivity_
Note: Generating source file: com.mycompany.sl.ui.VideoPlayerActivity_
Note: Generating source file: com.mycompany.sl.ui.VolumeTitleView_
Note: Generating source file: com.mycompany.sl.ui.studyprogress.StudyProgressActivity_
Note: Generating source file: com.mycompany.sl.api.SLAuthInterceptor_
Note: Generating source file: com.mycompany.sl.api.SLAuthStore_
Note: Generating source file: com.mycompany.sl.api.SLRestClient_
Note: Generating source file: com.mycompany.sl.ui.studyprogress.volume.StudyProgressVolumeActivity_
Note: Generating source file: com.mycompany.sl.ui.studyprogress.volume.StudyProgressVolumeItemView_
Note: Generating source file: com.mycompany.sl.ui.bookmark.AddBookmarkActivity_
Note: Generating source file: com.mycompany.sl.ui.bookmark.BookmarkFragment_
Note: Generating source file: com.mycompany.sl.ui.bookmark.BookmarkItemView_
Note: Generating source file: com.mycompany.sl.ui.download.DownloadListActivity_
Note: Generating source file: com.mycompany.sl.ui.download.DownloadListItemProduct_
Note: Generating source file: com.mycompany.sl.ui.download.DownloadVideoListItem_
Note: Generating source file: com.mycompany.sl.ui.download.DownloadedVolumeListItem_
Note: Time measurements: [Whole Processing = 837 ms], [Generate Sources = 590 ms], [Validate Annotations = 84 ms], [Process Annotations = 84 ms], [Extract Annotations = 41 ms], [Find R Classes = 27 ms], [Extract Manifest = 11 ms],
Note: Time measurements: [Whole Processing = 0 ms],
Note: Time measurements: [Whole Processing = 0 ms],
warning: The following options were not recognized by any processor: '[androidManifestFile]'
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/marky/myapp Android/android/src/main/java/com/mycompany/sl/api/SLRestClient.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:android:preDexDefaultFlavorDebug
:android:dexDefaultFlavorDebug
:android:processDefaultFlavorDebugJavaRes UP-TO-DATE
:android:validateDebugSigning
:android:packageDefaultFlavorDebug
:android:assembleDefaultFlavorDebug
BUILD SUCCESSFUL
Total time: 56.231 secs
最佳答案
您没有在全局 build.gradle 中包含 apt 插件,没有在模块的 build.gradle 中应用它,也没有配置它。由于 Android Annotations 与 Android Annotation Processor 一起工作,它需要知道生成的源在哪里。正确的设置是:
全局 build.gradle 代码 fragment :
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.0'
// small Gradle plugin that helps out when using an annotation processor
// --> Android Annotations
// makes the build code "available" to android studio
// adds it to the source path
classpath "com.neenbedankt.gradle.plugins:android-apt:1.4"
}
}
模块的一个:
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
configurations {
apt
}
// Configure the annotation processor and tell it where the manifest and the generated sources are.
apt {
arguments {
androidManifestFile variant.outputs[0].processResources.manifestFile
resourcePackageName "de.company.android.app"
}
}
除此之外,您不应使用 Android 注释的 googlecode 版本,而应使用以下依赖项:
dependencies {
apt 'org.androidannotations:androidannotations:3.2'
compile 'org.androidannotations:androidannotations-api:3.2'
}
在那之后一切都应该正常工作并且应该找到生成的源。在 Android Manifest 中注册生成的 Activity,例如 MainActivity_
关于Android Annotations/Gradle/Android Studio 构建问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21904478/
我经常使用 SSMS 查询数据和构建数据集,我的 IT 部门负责数据库管理。 最近我发现了 Azure Data Studio,我喜欢: 智能感知 源代码控制(例如使用 Git) 来自社区的扩展 SQ
我想根据我使用的 visual studio 版本编译不同的东西,比如 #if VISUAL_STUDIO_VERSION > 2015 eventH?.Invoke(this, EventArgs.
我们的开发团队计划从 visual studio 2005 升级到 visual studio 2010 -- 跳过 visual studio 2008。 大部分项目是VB ASP.NET项目,使用
我的Visual Studio 2015无法构建2010平台工具集。它说: The build tools for Visual Studio 2010 (v100) cannot be found.
我目前正在使用 Visual Studio 2015 来编程 ASP.NET Core 应用程序。我对安装 Visual Studio 2017 有以下疑问: 什么被认为是最佳实践和/或最干净的方法?
尝试从扩展和更新获取 Visual Studio 扩展时,出现以下错误:- 向 visualstudiogallery.msdn.microsoft.com/Services/VStudio/Exte
这个问题在这里已经有了答案: Can Visual Studio Code and VS 2012 be installed on same computer? (1 个回答) 关闭去年。 在安装了
作为标准安装的一部分,Visual Studio Code 带有一个名为“Monokai Dimmed”的颜色主题。 有没有办法将它移植到 Visual Studio 2015?我检查了社区主题( h
我想开始编程 CUDA。 我已经安装了 Visual Studio 2010 Express。 我还安装了 nVidia nSight Visual Studio。 而且我具备所有常见的先决条件(Ne
Visual Studio Community Edition是否可以使用Visual Studio Online帐户上的存储库? 我一直为包含在Online帐户中的Visual Studio Onl
我有一个我一直在开发的应用程序,但在 android studio 上遇到了问题。当我点击“build->run”然后选择我的设备时,应用程序永远不会在我的手机上运行(并且自动出现的android-s
我正在使用Visual Studio2010。我面临的一个问题是,当我创建一个新的Web项目时,Visual Studio将创建该项目,并且不会在解决方案资源管理器中显示其解决方案。 另一件事是,我想
我通读了这里的许多帖子,却找不到一个有效的明确答案。因此,在花了一些时间使它生效之后,我认为应该发布它。 问题:发布配置文件将建立在服务器上,但不会发布。 解: 确保已安装Microsoft Wind
我正在尝试使用Visual Studio 2012构建针对.NET 3.5的C++ CLI应用程序。 通过安装Visual Studio 2008,并指定v90平台工具集,我已经在一台机器上进行了这项
我在 Microsoft Visual Studios 2013 中有一个项目,我想在 Microsoft Visual Studios 2010 中打开它。有什么简单的方法吗?还是我必须在2010年
我想知道,如果我发送一个解决方案文件夹(它是用 visual studio C# 编写的),您可以在 visual studio for mac 中打开解决方案吗? 在visual studio 20
有没有办法在 Visual Studio Code 和 Visual Studio 中设置相同的快捷方式(而不必每次都手动更改它们)? 例如,我在 Visual Studio Code 中经常使用 A
我刚开始了解 Visual Studio Code。我想知道,我可以将 Visual Studio 替换为所有 .NET 开发相关的工作吗? 我可以节省 Visual Studio 许可的成本吗? V
我安装了具有有效许可证(Visual Studio 订阅)的 Visual Studio 2019 企业版(VS 2019 16.1.4),它运行良好。 突然之间,当我尝试打开项目或项目中的任何文件时
我一直在使用 Compass 编译 Windows 环境中的 sass 文件,无论是在命令行上还是使用 Compass-app 来查看目录。 我刚刚开始使用 Visual Studio(专业版 201
我是一名优秀的程序员,十分优秀!