- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用 AndroidStudio (0.8.9)、Gradle (2.1) 和 Android Annotations 3.0 开发应用程序。
正常的 gradle 同步没有问题。
但是当我尝试制作这个项目时,我遇到了一个奇怪的错误:它说在/build 的子目录中找不到 AndroidManifest.xml,尽管这个文件确实存在。
这里是尝试做 make 时的 gradle 输出:
Executing tasks: [: compileDebugSources]
Parallel execution with configuration on demand is an incubating feature.* * * * * * * * * * * * * * * * * * * * * * * * * * * *
variant: debug
manifest: [/home/laurent - bernabe / AndroidStudioProjects / ChessPositionManagerAndroid / build / intermediates / manifests / full / debug / AndroidManifest.xml]
aptOutput: /home/laurent - bernabe / AndroidStudioProjects / ChessPositionManagerAndroid / build / source / apt / debug * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
variant: release
manifest: [/home/laurent - bernabe / AndroidStudioProjects / ChessPositionManagerAndroid / build / intermediates / manifests / full / release / AndroidManifest.xml]
aptOutput: /home/laurent - bernabe / AndroidStudioProjects / ChessPositionManagerAndroid / build / source / apt / release * * * * * * * * * * * * * * * * * * * * * * * * * * * * : preBuild: preDebugBuild: checkDebugManifest: preReleaseBuild: prepareComAndroidSupportAppcompatV72000Library UP - TO - DATE: prepareComAndroidSupportSupportV42000Library UP - TO - DATE: prepareDebugDependencies: compileDebugAidl UP - TO - DATE: compileDebugRenderscript UP - TO - DATE: generateDebugBuildConfig UP - TO - DATE: generateDebugAssets UP - TO - DATE: mergeDebugAssets UP - TO - DATE: generateDebugResValues UP - TO - DATE: generateDebugResources UP - TO - DATE: mergeDebugResources UP - TO - DATE: processDebugManifest UP - TO - DATE: processDebugResources UP - TO - DATE: generateDebugSources UP - TO - DATE: compileDebugJava
Note: Resolve log file to / home / laurent - bernabe / AndroidStudioProjects / ChessPositionManagerAndroid / build / generated / source / apt / androidannotations.log
Note: 21: 15: 51.226[Daemon Thread 2] INFO o.a.AndroidAnnotationProcessor: 86 - Initialize AndroidAnnotationProcessor with options {
androidManifestFile = [/home/laurent - bernabe / AndroidStudioProjects / ChessPositionManagerAndroid / build / intermediates / manifests / full / debug / AndroidManifest.xml], resourcePackageName = com.loloof64.android.chs_pos_mngr
}
Note: 21: 15: 51.493[Daemon Thread 2] INFO o.a.AndroidAnnotationProcessor: 117 - Start processing
for 1 annotations on 8 elements
error: 21: 15: 51.541[Daemon Thread 2] ERROR o.a.h.AndroidManifestFinder: 95 - Could not find the AndroidManifest.xml file in specified path: [/home/laurent - bernabe / AndroidStudioProjects / ChessPositionManagerAndroid / build / intermediates / manifests / full / debug / AndroidManifest.xml]
Note: 21: 15: 51.542[Daemon Thread 2] INFO o.a.p.TimeStats: 81 - Time measurements: [Whole Processing = 49 ms],
[Extract Annotations = 44 ms],
[Extract Manifest = 3 ms],
Note: 21: 15: 51.543[Daemon Thread 2] INFO o.a.AndroidAnnotationProcessor: 131 - Finish processing
Note: 21: 15: 51.760[Daemon Thread 2] INFO o.a.AndroidAnnotationProcessor: 117 - Start processing
for 0 annotations on 0 elements
Note: 21: 15: 51.760[Daemon Thread 2] INFO o.a.p.TimeStats: 81 - Time measurements: [Whole Processing = 0 ms],
Note: 21: 15: 51.761[Daemon Thread 2] INFO o.a.AndroidAnnotationProcessor: 131 - Finish processing
warning: Unclosed files
for the types '[dummy1413746151186]';
these types will not undergo annotation processing
1 error
1 warning
FAILED
FAILURE: Build failed with an exception.*What went wrong: Execution failed
for task ':compileDebugJava'. > Compilation failed;
see the compiler error output
for details.*Try: Run with--stacktrace option to get the stack trace.Run with--info or--debug option to get more log output.
BUILD FAILED
Total time: 9.216 secs
这是我的 Gradle 脚本:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.13.2'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
}
}
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
repositories {
mavenCentral()
}
configurations {
apt
}
dependencies {
compile fileTree(include: '*.jar', dir: 'libs')
compile files('libs/androidsvg-1.2.1.jar')
compile 'com.android.support:appcompat-v7:20.0.0'
compile 'org.androidannotations:androidannotations-api:3.0'
apt 'org.androidannotations:androidannotations:3.0'
}
android {
compileSdkVersion 20
buildToolsVersion "20.0.0"
defaultConfig {
minSdkVersion 9
targetSdkVersion 20
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
// Move the tests to tests/java, tests/res, etc...
instrumentTest.setRoot('tests')
// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
// This moves them out of them default location under src/<type>/... which would
// conflict with src/ being used by the main source set.
// Adding new build types or product flavors should be accompanied
// by a similar customization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
}
apt {
arguments {
androidManifestFile variant.outputs.processResources.manifestFile
resourcePackageName 'com.loloof64.android.chs_pos_mngr'
}
}
def getSourceSetName(variant) {
return new File(variant.dirName).getName();
}
android.applicationVariants.all {
variant - >
def aptOutputDir = project.file("${project.buildDir}/source/apt/")
def aptOutput = new File(aptOutputDir, variant.dirName)
println "****************************"
println "variant: ${variant.name}"
println "manifest: ${variant.outputs.processResources.manifestFile}"
println "aptOutput: ${aptOutput}"
println "****************************"
android.sourceSets[getSourceSetName(variant)].java.srcDirs += aptOutput.getPath()
variant.javaCompile.options.compilerArgs += [
'-processorpath', configurations.apt.getAsPath(),
'-AandroidManifestFile=' + variant.outputs.processResources.manifestFile,
'-s', aptOutput
]
variant.javaCompile.source = variant.javaCompile.source.filter {
p - >
return !p.getPath().startsWith(aptOutputDir.getPath())
}
variant.javaCompile.doFirst {
aptOutput.mkdirs()
}
}
这是我的 list :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.loloof64.android.chs_pos_mngr"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.Base.AppCompat.Light.DarkActionBar">
<activity
android:name="com.loloof64.android.chs_pos_mngr.activities.PositionActivity_"
android:label="@string/title_activity_position"
android:uiOptions="splitActionBarWhenNarrow">
<meta-data android:name="android.support.UI_OPTIONS"
android:value="splitActionBarWhenNarrow" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
最佳答案
最后我找到了解决方案,感谢 yDelouis 让我走上了这条路:
我还必须在 gradle 脚本中删除下面的注释行:
apt {
arguments {
//androidManifestFile variant.outputs.processResources.manifestFile
resourcePackageName 'com.loloof64.android.chs_pos_mngr'
}
}
关于android-studio - Android Studio : can't find an existing file 中的 Android 注解,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26454468/
我在 SQL 查询中使用了一个简单的 IF NOT EXISTS/WHERE NOT EXISTS 语句(我都尝试过),但我总是收到 mysql 错误,不知道为什么。尝试使用不同的引号,检查我的 My
我有 2 个表:tbl1 和 tbl2。我想从 tbl1 返回一行,其中包含以下列:col1、col2、col3、can_be_deleted 、有重要项目。这个想法是,can_be_deleted
如果您是 "t1".persona_1_id = 2,则预期结果应返回 persona_id = 4。 like --- id persona_1_id persona_2_id liked 1 2
我遇到了这个用于执行幂等插入的 github SQL 代码示例。完全按照我想要的方式工作。我不想使用 EXISTS,因为我觉得它有点困惑。可以使用联接对相同的操作进行编码吗? 下面是我在 github
public bool CheckTblExist(string TblName) { try { string cmTxt = "s
表1 Id Name DemoID 1 a 33 2 b 44 3 c 33 4 d 33 5 e 44 表2 Id DemoID IsT
我对 SQL 非常陌生。我想知道当我使用“IF EXISTS”或“IF NOT EXISTS”时会发生什么。例如:以下两个语句有什么区别: 语句 1:(存在) IF EXISTS( SELECT OR
我正在更新 exist-db 集合中的 XML 文件,我必须检查是否存在 id 以决定是否必须在我的文档中替换或插入某些内容。 我注意到随着文件的增长,查询执行时间显着恶化,我决定为我的文件添加一个索
我有一个正在尝试更新的数据库,但我不明白为什么会收到有关不存在的列的奇怪错误。当我使用“heroku pg:psql”访问数据库时,我完全可以看到该列。我找到了couple其他questions遇到类
我有一个这样的查询 SELECT ... FROM ... WHERE (SELECT EXISTS (SELECT...)) which did not return anything th
我有一个可以对数据库执行插入和更新的程序,我从 API 获取数据。这是我得到的示例数据: $uname = $get['userName']; $oname = $get['offerNa
我的批处理文件中有这个脚本 -- if not exist "%JAVA_HOME%" ( echo JAVA_HOME '%JAVA_HOME%' path doesn't exist) -
有没有办法让 Directory.Exists/File.Existssince 区分大小写 Directory.Exists(folderPath) 和 Directory.Exists(folde
考虑使用这两个表和以下查询: SELECT Product. * FROM Product WHERE EXISTS ( SELECT * FROM Codes
我正在使用 Subclipse 1.6.18 使用 Eclipse 3.72 (Indigo) 来处理 SVN 1.6 存储库。这一切都在 Ubuntu 下运行。 我有一个项目,在我更新我的 Ecli
我正在尝试使用 Terraform 配置 Azure 存储帐户和文件共享: resource "random_pet" "prefix" {} provider "azurerm" { versi
我有兴趣为需要使用 NOT EXISTS 的应用程序编写查询。子句来检查一行是否存在。 我正在使用 Sybase,但我想知道一般 SQL 中是否有一个示例,您可以在其中编写具有 NOT EXISTS
我正在尝试使用 Terraform 配置 Azure 存储帐户和文件共享: resource "random_pet" "prefix" {} provider "azurerm" { versi
下面是代码示例: CREATE TABLE #titles( title_id varchar(20), title varchar(80)
我曾经这样编写 EXISTS 检查: IF EXISTS (SELECT * FROM TABLE WHERE Columns=@Filters) BEGIN UPDATE TABLE SET
我是一名优秀的程序员,十分优秀!