Maven的+生成AndroidAnnotations但不可到达班 [英] Maven + AndroidAnnotations generated but not reachable classes

查看:656
本文介绍了Maven的+生成AndroidAnnotations但不可到达班的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好了。

我试图创建一个项目,该项目是完全建立能够通过使用maven,只有有Maven。

目前我面临被产生这个问题的类,做工精细,只要是在实际的Java code没有提到。

含义,如果我创建一个示例作为<一href="https://github.com/excilys/androidannotations/blob/develop/examples/maveneclipse/src/main/java/com/google$c$c/androidannotations/maveneclipse/HelloAndroidActivity.java"相对=nofollow称号=文件AA>文档它的工作原理。

当我做这样的事情

  

意图I =新的意向书(SettingsActivity _);

然后构建失败,

  

未能执行目标org.apache.maven.plugins:Maven的编译器插件:3.0:编译(默认编译)项目InterestingFind:   编译失败找不到符号

 找不到符号
符号:变量DerpActivity_
位置:类be.company.android.DisplayMapActivity
 

不过,文件,确实会产生,因为你可以附着在图像中看到的,但是当项目在EN Eclipse视图看,它们只能看作是正常的文件夹,而不是作为源文件夹。

这也许可以解释为什么他们没有回升,但让我有点头疼。 我克隆一个机器人原型,发布版本。

请,有所帮助,如果你以某种方式想你能帮助我解决这个问题!

  

  http://maven.apache.org/maven-v4_0_0.xsd>       4.0.0

 &LT;父&GT;
    &LT;的groupId&GT; be.idamediafoundry&LT; /的groupId&GT;
    &LT; artifactId的&GT; InterestingFind亲&LT; / artifactId的&GT;
    &LT;版&GT; 1.0-SNAPSHOT&LT; /版本&GT;
&LT; /父&GT;

&LT;的groupId&GT; be.idamediafoundry&LT; /的groupId&GT;
&LT; artifactId的&GT; InterestingFind&LT; / artifactId的&GT;
&LT;版&GT; 1.0-SNAPSHOT&LT; /版本&GT;
&LT;包装&GT; APK&LT; /包装&GT;
&LT;名称&gt; InterestingFind  - 应用与LT; /名称&gt;
&LT;性状&gt;
    &LT; androidannotations.version&GT; 3.0-SNAPSHOT&LT; /androidannotations.version>
&LT; /性状&gt;

&LT;库&GT;
    &LT;库&GT;
        &LT; ID&GT;快照存储库&LT; / ID&GT;
        &LT;名称&gt; Sonatype的OSS快照回购和LT; /名称&gt;
        &LT;网址&GT;的https://oss.sonatype.org/content/repositories/snapshots< / URL&GT;
    &LT; /存储库&GT;
&LT; /存储库&GT;
&LT;依赖&GT;
    &LT;依赖&GT;
        &LT;的groupId&GT; com.google.android&LT; /的groupId&GT;
        &LT; artifactId的&GT;的android&LT; / artifactId的&GT;
    &LT; /依赖性&GT;
    &LT;依赖&GT;
        &LT;的groupId&GT; de.akquinet.android.androlog&LT; /的groupId&GT;
        &LT; artifactId的&GT; androlog&LT; / artifactId的&GT;
    &LT; /依赖性&GT;
    &所述;! -  JSON  - &GT;
    &LT;依赖&GT;
        &LT;的groupId&GT; 。组织codehaus.jackson&LT; /的groupId&GT;
        &LT; artifactId的&GT;杰克逊映射器 - 翔升&LT; / artifactId的&GT;
        &LT;版&GT; 1.9.5&LT; /版本&GT;
    &LT; /依赖性&GT;
    &所述;! -  AndroidAnnotations  - &GT;
    &LT;依赖&GT;
        &LT;的groupId&GT; org.androidannotations&LT; /的groupId&GT;
        &LT; artifactId的&GT; androidannotations&LT; / artifactId的&GT;
        &LT;版&GT; $ {androidannotations.version}&LT; /版本&GT;
        &LT;范围&GT;提供与LT; /范围&GT;
    &LT; /依赖性&GT;
    &LT;依赖&GT;
        &LT;的groupId&GT; org.androidannotations&LT; /的groupId&GT;
        &LT; artifactId的&GT; androidannotations-API&LT; / artifactId的&GT;
        &LT;版&GT; $ {androidannotations.version}&LT; /版本&GT;
    &LT; /依赖性&GT;

    &LT;! - 所需的androidannotations  - &GT;
    &LT;依赖&GT;
        &LT;的groupId&GT; org.springframework.android&LT; /的groupId&GT;
        &LT; artifactId的&GT;弹簧Android的休息模板和LT; / artifactId的&GT;
        &LT;版&GT; $ {弹簧的Andr​​oid版本}&LT; /版本&GT;
    &LT; /依赖性&GT;

    !&LT;  - 谷歌播放服务:应编制并添加到本地回购 - &GT;
    &LT;依赖&GT;
        &LT;的groupId&GT; com.google.android.gms&LT; /的groupId&GT;
        &LT; artifactId的&GT;谷歌播放服务&LT; / artifactId的&GT;
        &LT;版&GT; 5℃/版本&GT;
        &LT;类型&GT; apklib&LT; /类型&GT;
    &LT; /依赖性&GT;
&LT; /依赖性&GT;

&LT;建立&GT;
    &LT;插件&GT;


        &LT;插件&GT;
        &LT;的groupId&GT; com.jayway.maven.plugins.android.generation2&LT; /的groupId&GT;
        &LT; artifactId的&GT; Android的行家,插件和LT; / artifactId的&GT;
        &LT;版&GT; 3.5.1&LT; /版本&GT;
        &LT;继承&GT;真&LT; /继承&GT;
        &LT;扩展&GT;真&LT; /扩展&GT;
        &lt;结构&GT;
            &LT; androidManifestFile&GT; $ {project.basedir} /AndroidManifest.xml</androidManifestFile>
            &LT; assetsDirectory&GT; $ {project.basedir} /资产&LT; / assetsDirectory&GT;
            &LT; resourceDirectory&GT; $ {project.basedir} / RES&LT; / resourceDirectory&GT;
            &LT; nativeLibrariesDirectory&GT; $ {project.basedir} / src目录/主/本地&LT; / nativeLibrariesDirectory&GT;
            &LT; SDK&GT;
                &LT;平台&GT; 15℃; /平台&GT;
            &LT; / SDK&GT;
            &LT; undeployBeforeDeploy&GT;真&LT; / undeployBeforeDeploy&GT;
        &LT; /结构&gt;
    &LT; /插件&GT;

        &LT;插件&GT;
            &LT; artifactId的&GT;的版本,Maven的插件&LT; / artifactId的&GT;
            &LT;的groupId&GT;组织codehaus.mojo&LT; /的groupId&GT;
            &LT;版&GT; 2.0&LT; /版本&GT;
        &LT; /插件&GT;

        &LT;插件&GT;
            &LT;的groupId&GT; org.apache.maven.plugins&LT; /的groupId&GT;
            &LT; artifactId的&GT; Maven的Eclipse的插件&LT; / artifactId的&GT;
            &LT;版&GT; 2.9&LT; /版本&GT;
            &lt;结构&GT;
                &LT; additionalProjectnatures&GT;
                    &LT; projectnature&GT; com.android.ide.eclipse.adt.AndroidNature&LT; / projectnature&GT;
                    &LT; projectnature&GT; org.eclipse.jdt.core.javanature&LT; / projectnature&GT;
                &LT; / additionalProjectnatures&GT;
            &LT; /结构&gt;
        &LT; /插件&GT;
    &LT; /插件&GT;
&LT; /编译&GT;

&LT;曲线&GT;
    &LT;型材&GT;
        &LT; ID&GT;释放&LT; / ID&GT;
        &LT;建立&GT;
            &LT;插件&GT;
                &LT;插件&GT;
                    &LT;的groupId&GT; com.pyx4me&LT; /的groupId&GT;
                    &LT; artifactId的&GT; ProGuard的 -  Maven的插件&LT; / artifactId的&GT;
                    &LT;执行&GT;
                        &LT;执行&GT;
                            &LT; ID&GT;工艺类与 -  ProGuard的&LT; / ID&GT;
                            &LT;阶段&gt;工艺类&LT; /阶段&gt;
                            &LT;目标&GT;
                                &LT;目标&GT;的ProGuard&LT; /目标&GT;
                            &LT; /目标&GT;
                            &lt;结构&GT;
                                &LT; proguardVersion&GT; 4.4&LT; / proguardVersion&GT;
                                &LT; maxMemory&GT;256米&LT; / maxMemory&GT;
                                &LT; injar&GT;类&LT; / injar&GT;
                                &LT;库&GT;
                                    &LT; lib目录&GT; $ {rt.jar.path}&LT; / lib目录&GT;
                                    &LT; lib目录&GT; $ {jsse.jar.path}&LT; / lib目录&GT;
                                &LT; /库&GT;
                                &LT;混淆&GT;真&LT; /混淆&GT;
                                &LT; addMavenDescriptor&GT;假&LT; / addMavenDescriptor&GT;
                                &LT; proguardInclude&GT; $ {project.basedir} /proguard.conf</proguardInclude>
                            &LT; /结构&gt;
                        &LT; /执行&GT;
                    &LT; /执行&GT;
                    &LT;依赖&GT;
                        &LT;依赖&GT;
                            &LT;的groupId&GT; net.sf.proguard&LT; /的groupId&GT;
                            &LT; artifactId的&GT;的ProGuard&LT; / artifactId的&GT;
                            &LT;版&GT; 4.4&LT; /版本&GT;
                            &LT;范围&GT;运行&LT; /范围&GT;
                        &LT; /依赖性&GT;
                    &LT; /依赖性&GT;
                &LT; /插件&GT;
                &LT;插件&GT;
                    &LT; artifactId的&GT;的maven-的jarsigner,插件和LT; / artifactId的&GT;
                    &LT;执行&GT;
                        &LT;执行&GT;
                            &LT; ID&gt;登录,应用APK&LT; / ID&GT;
                            &LT;阶段&gt;包&LT; /阶段&gt;
                            &LT;目标&GT;
                                &LT;目标&gt;登录&LT; /目标&GT;
                                &LT;目标&GT;验证&LT; /目标&GT;
                            &LT; /目标&GT;
                        &LT; /执行&GT;
                    &LT; /执行&GT;
                &LT; /插件&GT;
                &LT;插件&GT;
                    &LT;的groupId&GT; com.jayway.maven.plugins.android.generation2&LT; /的groupId&GT;
                    &LT; artifactId的&GT; Android的行家,插件和LT; / artifactId的&GT;
                    &LT;执行&GT;
                        &LT;执行&GT;
                            &LT; ID&GT; zipalign应用,APK&LT; / ID&GT;
                            &LT;阶段&gt;包&LT; /阶段&gt;
                            &LT;目标&GT;
                                &LT;目标&GT; zipalign&LT; /目标&GT;
                            &LT; /目标&GT;
                        &LT; /执行&GT;
                    &LT; /执行&GT;
                    &lt;结构&GT;
                        &LT;发布&GT;真&LT; /释放&GT;
                        &LT; zipalign&GT;
                            &LT(详细);真&LT; /详细&GT;
                            <inputApk>${project.build.directory}/${project.artifactId}-${project.version}.apk</inputApk>
                            <outputApk>${project.build.directory}/${project.artifactId}-${project.version}-signed-aligned.apk</outputApk>
                        &LT; / zipalign&GT;
                        &LT;标志&GT;
                            &LT;调试&GT;假&LT; /调试&GT;
                        &LT; /标志&GT;
                    &LT; /结构&gt;
                &LT; /插件&GT;
                &LT;插件&GT;
                    &LT;的groupId&GT;组织codehaus.mojo&LT; /的groupId&GT;
                    &LT; artifactId的&GT;构建辅助,Maven的插件&LT; / artifactId的&GT;

                    &lt;结构&GT;
                        &LT;神器&GT;
                            &LT;神器&GT;
                                &LT;文件&gt; $ {project.build.directory} /proguard_map.txt</file>
                                &LT;类型&GT;地图&LT; /类型&GT;
                                &LT;分级&GT;释放&LT; /分类&GT;
                            &LT; /神器&GT;
                        &LT; /神器&GT;
                    &LT; /结构&gt;
                    &LT;执行&GT;
                        &LT;执行&GT;
                            &LT; ID&GT;附加签名对齐&LT; / ID&GT;
                            &LT;阶段&gt;包&LT; /阶段&gt;
                            &LT;目标&GT;
                                &LT;目标&GT;附加神器&LT; /目标&GT;
                            &LT; /目标&GT;
                        &LT; /执行&GT;
                        &LT;执行&GT;
                            &LT;阶段&gt;产生,来源和LT; /阶段&gt;
                            &LT;目标&GT;
                                &LT;目标&gt;添加源&LT; /目标&GT;
                            &LT; /目标&GT;
                            &lt;结构&GT;
                                &LT;源&GT;
                                    &lt;信源&GT; $ {project.basedir} /目标/生成,源/注释和LT; /源&GT;
                                &LT; /来源&GT;
                            &LT; /结构&gt;
                        &LT; /执行&GT;
                    &LT; /执行&GT;
                &LT; /插件&GT;
            &LT; /插件&GT;
        &LT; /编译&GT;
    &LT; /简介&GT;
&LT; /型材&GT;
 

父POM:

  

  http://maven.apache.org/maven-v4_0_0.xsd>       4.0.0

 &LT;的groupId&GT; be.idamediafoundry&LT; /的groupId&GT;
&LT; artifactId的&GT; InterestingFind亲&LT; / artifactId的&GT;
&LT;版&GT; 1.0-SNAPSHOT&LT; /版本&GT;
&LT;包装&GT; POM&LT; /包装&GT;
&LT;名称&gt; InterestingFind  - 家长和LT; /名称&gt;

&LT;模块&gt;
    &LT;模块&GT; InterestingFind&LT; /模块&GT;
    &LT;模块&GT; InterestingFind,它与LT; /模块&GT;
&LT; /模块&gt;

&LT;性状&gt;
    &LT; platform.version&GT; 4.1.1.4&LT; /platform.version>
    &LT; Android的插件&GT; 3.5.1&LT; / Android的插件&GT;
    &LT;弹簧的Andr​​oid版本&GT; 1.0.1.RELEASE&LT; /弹簧的Andr​​oid版本&GT;
    &LT; sign.keystore&GT; $ {project.basedir} /my-release-key.keystore</sign.keystore>
    &LT; sign.alias&GT;
    &LT; /sign.alias>
    &LT; sign.storepass&GT;
    &LT; /sign.storepass>
    &LT; sing.keypass&GT;
    &LT; /sing.keypass>

&LT; /性状&gt;

&LT;库&GT;
    &LT;库&GT;
        &LT; ID&GT; codehaus,快照和LT; / ID&GT;
        &LT;网址&GT; HTTP://snapshots.repository.$c$chaus.org< / URL&GT;
    &LT; /存储库&GT;

&LT; /存储库&GT;

&LT; dependencyManagement&GT;
    &LT;依赖&GT;

        &LT;依赖&GT;
            &LT;的groupId&GT; com.jayway.maven.plugins.android.generation2&LT; /的groupId&GT;
            &LT; artifactId的&GT; Android的行家,插件和LT; / artifactId的&GT;
            &LT;版&GT; 3.5.1&LT; /版本&GT;
        &LT; /依赖性&GT;
        &LT;依赖&GT;
            &LT;的groupId&GT; com.google.android&LT; /的groupId&GT;
            &LT; artifactId的&GT;的android&LT; / artifactId的&GT;
            &LT;版&GT; $ {platform.version}&LT; /版本&GT;
            &LT;范围&GT;提供与LT; /范围&GT;
        &LT; /依赖性&GT;
        &LT;依赖&GT;
            &LT;的groupId&GT; com.google.android&LT; /的groupId&GT;
            &LT; artifactId的&GT;机器人测试&LT; / artifactId的&GT;
            &LT;版&GT; $ {platform.version}&LT; /版本&GT;
            &LT;范围&GT;提供与LT; /范围&GT;
        &LT; /依赖性&GT;

        &LT;! -  Androlog是一个记录和报告库Android的 - &GT;
        &LT;依赖&GT;
            &LT;的groupId&GT; de.akquinet.android.androlog&LT; /的groupId&GT;
            &LT; artifactId的&GT; androlog&LT; / artifactId的&GT;
            &LT;版&GT; 1.0.5&LT; /版本&GT;
        &LT; /依赖性&GT;

        &LT;依赖&GT;
            &LT;的groupId&GT;的JUnit&LT; /的groupId&GT;
            &LT; artifactId的&GT;的JUnit&LT; / artifactId的&GT;
            &LT;版&GT; 4.10&LT; /版本&GT;
            &LT;范围&GT;提供与LT; /范围&GT;
        &LT; /依赖性&GT;

    &LT; /依赖性&GT;


&LT; / dependencyManagement&GT;

&LT;建立&GT;
    &LT; pluginManagement&GT;
        &LT;插件&GT;

            &LT;插件&GT;
                &LT;的groupId&GT; com.jayway.maven.plugins.android.generation2&LT; /的groupId&GT;
                &LT; artifactId的&GT; Android的行家,插件和LT; / artifactId的&GT;
                &LT;版&GT; 3.5.1&LT; /版本&GT;
                &LT;继承&GT;真&LT; /继承&GT;
                &lt;结构&GT;
                    &LT; androidManifestFile&GT; $ {project.basedir} /AndroidManifest.xml</androidManifestFile>
                    &LT; assetsDirectory&GT; $ {project.basedir} /资产&LT; / assetsDirectory&GT;
                    &LT; resourceDirectory&GT; $ {project.basedir} / RES&LT; / resourceDirectory&GT;
                    &LT; nativeLibrariesDirectory&GT; $ {project.basedir} / src目录/主/本地&LT; / nativeLibrariesDirectory&GT;
                    &LT; SDK&GT;
                        &LT;平台&GT; 15℃; /平台&GT;
                    &LT; / SDK&GT;
                    &LT; undeployBeforeDeploy&GT;真&LT; / undeployBeforeDeploy&GT;
                &LT; /结构&gt;
            &LT; /插件&GT;
            &LT;插件&GT;
                &LT;的groupId&GT; org.apache.maven.plugins&LT; /的groupId&GT;
                &LT; artifactId的&GT; Maven的编译器插件&LT; / artifactId的&GT;
                &LT;版&GT; 3.0&LT; /版本&GT;
                &lt;结构&GT;
                    &lt;信源&GT; 1.6&LT; /源&GT;
                    &lt;目标&GT; 1.6&LT; /目标和GT;
                &LT; /结构&gt;
                &LT;扩展&GT;真&LT; /扩展&GT;
            &LT; /插件&GT;
            &LT;插件&GT;
                &LT; artifactId的&GT; Maven的执行者,插件和LT; / artifactId的&GT;
                &LT;版&GT; 1.0&LT; /版本&GT;
            &LT; /插件&GT;
            &LT;插件&GT;
                &LT; artifactId的&GT;行家释放,插件和LT; / artifactId的&GT;
                &LT;版&GT; 2.1&LT; /版本&GT;
                &lt;结构&GT;
                    &LT; autoVersionSubmodules&GT;真&LT; / autoVersionSubmodules&GT;
                &LT; /结构&gt;
            &LT; /插件&GT;
            &LT;插件&GT;
                &LT; artifactId的&GT;的maven-的jarsigner,插件和LT; / artifactId的&GT;
                &LT;版&GT; 1.2&LT; /版本&GT;
                &LT;继承&GT;真&LT; /继承&GT;
                &lt;结构&GT;
                    &LT; removeExistingSignatures&GT;真&LT; / removeExistingSignatures&GT;
                    &LT; archiveDirectory /&GT;
                    <archive>${project.build.directory}/${project.build.finalName}.${project.packaging}</archive>
                    &LT(详细);真&LT; /详细&GT;
                    &LT;证书&GT;真&LT; /证书&GT;
                    &LT;密钥库&GT; $ {sign.keystore}&LT; /密钥库&GT;
                    &LT;别名&GT; $ {sign.alias}&LT; /别名&GT;
                    &LT; Storepass用于&GT; $ {sign.storepass}&LT; / Storepass用于&GT;
                    &LT;关键通过&GT; $ {sign.keypass}&LT; /关键通过&GT;
                &LT; /结构&gt;
            &LT; /插件&GT;
            &LT;插件&GT;
                &LT;的groupId&GT; com.pyx4me&LT; /的groupId&GT;
                &LT; artifactId的&GT; ProGuard的 -  Maven的插件&LT; / artifactId的&GT;
                &LT;版&GT; 2.0.4&LT; /版本&GT;
                &LT;依赖&GT;
                    &LT;依赖&GT;
                        &LT;的groupId&GT; net.sf.proguard&LT; /的groupId&GT;
                        &LT; artifactId的&GT;的ProGuard&LT; / artifactId的&GT;
                        &LT;版&GT; 4.4&LT; /版本&GT;
                        &LT;范围&GT;运行&LT; /范围&GT;
                    &LT; /依赖性&GT;
                &LT; /依赖性&GT;
                &lt;结构&GT;
                    &LT; proguardVersion&GT; 4.4&LT; / proguardVersion&GT;
                &LT; /结构&gt;
            &LT; /插件&GT;
        &LT; /插件&GT;
    &LT; / pluginManagement&GT;
&LT; /编译&GT;

&LT;曲线&GT;
    &LT;型材&GT;
        &LT; ID&GT;释放&LT; / ID&GT;
        &LT;激活&GT;
            &LT;性&gt;
                &LT;名称&gt;&performRelease LT; /名称&gt;
                &LT;价值&GT;真&LT; /值GT;
            &LT; /性&gt;
        &LT; /活化GT;
        &LT;建立&GT;
            &LT;插件&GT;
                &LT;插件&GT;
                    &LT;的groupId&GT; com.jayway.maven.plugins.android.generation2&LT; /的groupId&GT;
                    &LT; artifactId的&GT; Android的行家,插件和LT; / artifactId的&GT;
                    &LT;版&GT; $ {Android的插件}&LT; /版本&GT;
                    &lt;结构&GT;
                        &LT;发布&GT;真&LT; /释放&GT;
                    &LT; /结构&gt;
                &LT; /插件&GT;

                &LT;插件&GT;
                    &LT; artifactId的&GT; Maven的执行者,插件和LT; / artifactId的&GT;
                    &LT;执行&GT;
                        &LT;执行&GT;
                            &LT; ID&GT;执行签名,性能和LT; / ID&GT;
                            &LT;目标&GT;
                                &LT;目标&GT;执行&LT; /目标&GT;
                            &LT; /目标&GT;
                            &lt;结构&GT;
                                &LT;规则&GT;
                                    &LT; requireProperty&GT;
                                        &LT;性&gt; sign.keystore&LT; /性&gt;
                                        &LT;消息&gt;将sign.keystore属性缺失。它必须
                                            包含的路径
                                            密钥库用于签署
                                            应用。
                                        &LT; /消息&GT;
                                    &LT; / requireProperty&GT;
                                    &LT; requireFilesExist&GT;
                                        &LT;文件&GT;
                                            &LT;文件&gt; $ {sign.keystore}&LT; /文件&gt;
                                        &LT; /文件&GT;
                                        &LT;消息&gt;将sign.keystore属性不指向
                                            文件。它必须包含
                                            路径用于签名密钥库
                                            应用程序。
                                        &LT; /消息&GT;
                                    &LT; / requireFilesExist&GT;
                                    &LT; requireProperty&GT;
                                        &LT;性&gt; sign.alias&LT; /性&gt;
                                        &LT;消息&gt;将sign.alias属性缺失。它必须
                                            包含用于密钥别名
                                            签署申请。
                                        &LT; /消息&GT;
                                    &LT; / requireProperty&GT;
                                    &LT; requireProperty&GT;
                                        &LT;性&gt; sign.storepass&LT; /性&gt;
                                        &LT;消息&gt;将sign.storepass属性缺失。它必须
                                            包含的密码
                                            用来签署的密钥库
                                            应用。
                                        &LT; /消息&GT;
                                    &LT; / requireProperty&GT;
                                    &LT; requireProperty&GT;
                                        &LT;性&gt; sign.keypass&LT; /性&gt;
                                        &LT;消息&gt;将sign.keypass属性缺失。它必须
                                            包含的密码
                                            键用来签署应用程序。
                                        &LT; /消息&GT;
                                    &LT; / requireProperty&GT;
                                &LT; /规则&GT;
                            &LT; /结构&gt;
                        &LT; /执行&GT;
                    &LT; /执行&GT;
                &LT; /插件&GT;
            &LT; /插件&GT;
        &LT; /编译&GT;
    &LT; /简介&GT;
    &LT;型材&GT;
        &LT; ID&GT;的Linux&LT; / ID&GT;
        &LT;激活&GT;
            &LT; OS&GT;
                &LT;家庭&GT; UNIX&LT; /家庭&GT;
            &LT; / OS&GT;
        &LT; /活化GT;
        &LT;性状&gt;
            &LT; rt.jar.path&GT; $ {java.home} /jre/lib/rt.jar</rt.jar.path>
            &LT; jsse.jar.path&GT; $ {java.home} /jre/lib/jsse.jar</jsse.jar.path>
        &LT; /性状&gt;
    &LT; /简介&GT;
    &LT;! -  MAC轮廓已经成为UNIX后,因为在Mac上运行将触发
        双方 - &GT;
    &LT;型材&GT;
        &LT; ID&GT; MAC&LT; / ID&GT;
        &LT;激活&GT;
            &LT; OS&GT;
                &LT;家庭&GT; MAC&LT; /家庭&GT;
            &LT; / OS&GT;
        &LT; /活化GT;
        &LT;性状&gt;
            &LT;  - !绝对路径 - &GT;
            <!--<rt.jar.path>/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/classes.jar</rt.jar.path> - &GT;
            &LT;! - 或JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/  - &GT;
            &LT; rt.jar.path&GT; $ {java.home} /../类/ classes.jar&LT; /rt.jar.path>
            &LT; jsse.jar.path&GT; $ {java.home} /../类/ jsse.jar&LT; /jsse.jar.path>
        &LT; /性状&gt;
    &LT; /简介&GT;
    &LT;型材&GT;
        &LT; ID&GT;窗口&LT; / ID&GT;
        &LT;激活&GT;
            &LT; OS&GT;
                &LT;家庭&GT;窗口&LT; /家庭&GT;
            &LT; / OS&GT;
        &LT; /活化GT;
        &LT;性状&gt;
            &LT; rt.jar.path&GT; $ {java.home} /jre/lib/rt.jar</rt.jar.path>
            &LT; jsse.jar.path&GT; $ {java.home} /jre/lib/jsse.jar</jsse.jar.path>
        &LT; /性状&gt;
    &LT; /简介&GT;
&LT; /型材&GT;
 

修改:更新POM 修改:上传日志文件

解决方案

看来问题是由一个依赖未得到解决而引起的。

在第一个Maven甚至没有报告这个缺失的依赖,直到我开始删除从我的聚甲醛的东西,我在试图解决这个问题,又增加了。

现在,有什么解释的依赖性并没有得到自动解决,是事实,有没有这样的神器在中央M​​aven仓库。

因此​​,我增加了以下信息库:

 &LT;库&GT;
    &LT;! - 为了开发了Android罗马Feed阅读器 - &GT;
    &LT;库&GT;
        &LT; ID&GT; Android的罗马提要阅读器,库&LT; / ID&GT;
        &LT;名称&gt; Android的罗马Feed阅读器库&LT; /名称&gt;
        &LT;网址&GT;的https://android-rome-feed-reader.google$c$c.com/svn/maven2/releases< / URL&GT;
    &LT; /存储库&GT;
&LT; /存储库&GT;
 

在'隐藏'的依赖致使得到解决。

这依赖似乎有需要的

 &LT;! - 集所需的androidannotations REST接口 - &GT;
    &LT;依赖&GT;
        &LT;的groupId&GT; org.springframework.android&LT; /的groupId&GT;
        &LT; artifactId的&GT;弹簧Android的休息模板和LT; / artifactId的&GT;
        &LT;版&GT; $ {弹簧的Andr​​oid版本}&LT; /版本&GT;
    &LT; /依赖性&GT;
 

春天文档报告,这这是我们在说需要由剩下的模板RSS和Atom提要支持。的'隐藏的依赖

是什么让这甚至离奇的是,通过AA诠释了最初的活动得到了创建,并很好地解决。只要我不是指生成的类,如:汽车导航系统,则它没有编译和运行。 从我试过​​然而,使用code一个class_,它去了这条道路。

希望这有助于!

Alright.

I'm attempting to create a project which is perfectly build able by using maven, and maven only.

Currently I'm facing this issue of classes being generated, and working fine, as long as there is no reference in actual java code.

Meaning, that if I create an example as in the documentation it works.

As soon as I do something like

Intent i = new Intent(SettingsActivity_);

then the build fails with

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project InterestingFind: Compilation failure cannot find symbol

cannot find symbol
symbol:   variable DerpActivity_
location: class be.company.android.DisplayMapActivity

The files however, do get generated, as you can see in the image attached, but when the project is looked at in en Eclipse view, they are solely seen as normal folders, and not as 'source folder'.

This might explain why they are not picked up, but gives me a bit of a headache. I cloned an android archetype, the release build.

Please, be of assistance if you in some way think you can aid me with this problem!

http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0

<parent>
    <groupId>be.idamediafoundry</groupId>
    <artifactId>InterestingFind-parent</artifactId>
    <version>1.0-SNAPSHOT</version>
</parent>

<groupId>be.idamediafoundry</groupId>
<artifactId>InterestingFind</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>apk</packaging>
<name>InterestingFind - Application</name>
<properties>
    <androidannotations.version>3.0-SNAPSHOT</androidannotations.version>
</properties>

<repositories>
    <repository>
        <id>snapshots-repository</id>
        <name>Sonatype oss snapshot repo</name>
        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupId>com.google.android</groupId>
        <artifactId>android</artifactId>
    </dependency>
    <dependency>
        <groupId>de.akquinet.android.androlog</groupId>
        <artifactId>androlog</artifactId>
    </dependency>
    <!-- JSON -->
    <dependency>
        <groupId> org.codehaus.jackson</groupId>
        <artifactId>jackson-mapper-asl</artifactId>
        <version>1.9.5</version>
    </dependency>
    <!-- AndroidAnnotations -->
    <dependency>
        <groupId>org.androidannotations</groupId>
        <artifactId>androidannotations</artifactId>
        <version>${androidannotations.version}</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.androidannotations</groupId>
        <artifactId>androidannotations-api</artifactId>
        <version>${androidannotations.version}</version>
    </dependency>

    <!-- Needed for androidannotations -->
    <dependency>
        <groupId>org.springframework.android</groupId>
        <artifactId>spring-android-rest-template</artifactId>
        <version>${spring-android-version}</version>
    </dependency>

    <!-- Google Play Services : Should be compiled and added to local repo -->
    <dependency>
        <groupId>com.google.android.gms</groupId>
        <artifactId>google-play-services</artifactId>
        <version>5</version>
        <type>apklib</type>
    </dependency>
</dependencies>

<build>
    <plugins>


        <plugin>
        <groupId>com.jayway.maven.plugins.android.generation2</groupId>
        <artifactId>android-maven-plugin</artifactId>
        <version>3.5.1</version>
        <inherited>true</inherited>
        <extensions>true</extensions>
        <configuration>
            <androidManifestFile>${project.basedir}/AndroidManifest.xml</androidManifestFile>
            <assetsDirectory>${project.basedir}/assets</assetsDirectory>
            <resourceDirectory>${project.basedir}/res</resourceDirectory>
            <nativeLibrariesDirectory>${project.basedir}/src/main/native</nativeLibrariesDirectory>
            <sdk>
                <platform>15</platform>
            </sdk>
            <undeployBeforeDeploy>true</undeployBeforeDeploy>
        </configuration>
    </plugin>

        <plugin>
            <artifactId>versions-maven-plugin</artifactId>
            <groupId>org.codehaus.mojo</groupId>
            <version>2.0</version>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-eclipse-plugin</artifactId>
            <version>2.9</version>
            <configuration>
                <additionalProjectnatures>
                    <projectnature>com.android.ide.eclipse.adt.AndroidNature</projectnature>
                    <projectnature>org.eclipse.jdt.core.javanature</projectnature>
                </additionalProjectnatures>
            </configuration>
        </plugin>
    </plugins>
</build>

<profiles>
    <profile>
        <id>release</id>
        <build>
            <plugins>
                <plugin>
                    <groupId>com.pyx4me</groupId>
                    <artifactId>proguard-maven-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>process-classes-with-proguard</id>
                            <phase>process-classes</phase>
                            <goals>
                                <goal>proguard</goal>
                            </goals>
                            <configuration>
                                <proguardVersion>4.4</proguardVersion>
                                <maxMemory>256m</maxMemory>
                                <injar>classes</injar>
                                <libs>
                                    <lib>${rt.jar.path}</lib>
                                    <lib>${jsse.jar.path}</lib>
                                </libs>
                                <obfuscate>true</obfuscate>
                                <addMavenDescriptor>false</addMavenDescriptor>
                                <proguardInclude>${project.basedir}/proguard.conf</proguardInclude>
                            </configuration>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>net.sf.proguard</groupId>
                            <artifactId>proguard</artifactId>
                            <version>4.4</version>
                            <scope>runtime</scope>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <artifactId>maven-jarsigner-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>sign-application-apk</id>
                            <phase>package</phase>
                            <goals>
                                <goal>sign</goal>
                                <goal>verify</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>com.jayway.maven.plugins.android.generation2</groupId>
                    <artifactId>android-maven-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>zipalign-application-apk</id>
                            <phase>package</phase>
                            <goals>
                                <goal>zipalign</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <release>true</release>
                        <zipalign>
                            <verbose>true</verbose>
                            <inputApk>${project.build.directory}/${project.artifactId}-${project.version}.apk</inputApk>
                            <outputApk>${project.build.directory}/${project.artifactId}-${project.version}-signed-aligned.apk</outputApk>
                        </zipalign>
                        <sign>
                            <debug>false</debug>
                        </sign>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>

                    <configuration>
                        <artifacts>
                            <artifact>
                                <file>${project.build.directory}/proguard_map.txt</file>
                                <type>map</type>
                                <classifier>release</classifier>
                            </artifact>
                        </artifacts>
                    </configuration>
                    <executions>
                        <execution>
                            <id>attach-signed-aligned</id>
                            <phase>package</phase>
                            <goals>
                                <goal>attach-artifact</goal>
                            </goals>
                        </execution>
                        <execution>
                            <phase>generate-sources</phase>
                            <goals>
                                <goal>add-source</goal>
                            </goals>
                            <configuration>
                                <sources>
                                    <source>${project.basedir}/target/generated-sources/annotations</source>
                                </sources>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    </profile>
</profiles>

Parent Pom :

http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0

<groupId>be.idamediafoundry</groupId>
<artifactId>InterestingFind-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>InterestingFind - Parent</name>

<modules>
    <module>InterestingFind</module>
    <module>InterestingFind-it</module>
</modules>

<properties>
    <platform.version>4.1.1.4</platform.version>
    <android-plugin>3.5.1</android-plugin>
    <spring-android-version>1.0.1.RELEASE</spring-android-version>
    <sign.keystore>${project.basedir}/my-release-key.keystore</sign.keystore>
    <sign.alias>
    </sign.alias>
    <sign.storepass>
    </sign.storepass>
    <sing.keypass>
    </sing.keypass>

</properties>

<repositories>
    <repository>
        <id>codehaus-snapshots</id>
        <url>http://snapshots.repository.codehaus.org</url>
    </repository>

</repositories>

<dependencyManagement>
    <dependencies>

        <dependency>
            <groupId>com.jayway.maven.plugins.android.generation2</groupId>
            <artifactId>android-maven-plugin</artifactId>
            <version>3.5.1</version>
        </dependency>
        <dependency>
            <groupId>com.google.android</groupId>
            <artifactId>android</artifactId>
            <version>${platform.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.android</groupId>
            <artifactId>android-test</artifactId>
            <version>${platform.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- Androlog is a logging and reporting library for Android -->
        <dependency>
            <groupId>de.akquinet.android.androlog</groupId>
            <artifactId>androlog</artifactId>
            <version>1.0.5</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.10</version>
            <scope>provided</scope>
        </dependency>

    </dependencies>


</dependencyManagement>

<build>
    <pluginManagement>
        <plugins>

            <plugin>
                <groupId>com.jayway.maven.plugins.android.generation2</groupId>
                <artifactId>android-maven-plugin</artifactId>
                <version>3.5.1</version>
                <inherited>true</inherited>
                <configuration>
                    <androidManifestFile>${project.basedir}/AndroidManifest.xml</androidManifestFile>
                    <assetsDirectory>${project.basedir}/assets</assetsDirectory>
                    <resourceDirectory>${project.basedir}/res</resourceDirectory>
                    <nativeLibrariesDirectory>${project.basedir}/src/main/native</nativeLibrariesDirectory>
                    <sdk>
                        <platform>15</platform>
                    </sdk>
                    <undeployBeforeDeploy>true</undeployBeforeDeploy>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
                <extensions>true</extensions>
            </plugin>
            <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.0</version>
            </plugin>
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.1</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-jarsigner-plugin</artifactId>
                <version>1.2</version>
                <inherited>true</inherited>
                <configuration>
                    <removeExistingSignatures>true</removeExistingSignatures>
                    <archiveDirectory />
                    <archive>${project.build.directory}/${project.build.finalName}.${project.packaging}</archive>
                    <verbose>true</verbose>
                    <certs>true</certs>
                    <keystore>${sign.keystore}</keystore>
                    <alias>${sign.alias}</alias>
                    <storepass>${sign.storepass}</storepass>
                    <keypass>${sign.keypass}</keypass>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.pyx4me</groupId>
                <artifactId>proguard-maven-plugin</artifactId>
                <version>2.0.4</version>
                <dependencies>
                    <dependency>
                        <groupId>net.sf.proguard</groupId>
                        <artifactId>proguard</artifactId>
                        <version>4.4</version>
                        <scope>runtime</scope>
                    </dependency>
                </dependencies>
                <configuration>
                    <proguardVersion>4.4</proguardVersion>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
</build>

<profiles>
    <profile>
        <id>release</id>
        <activation>
            <property>
                <name>performRelease</name>
                <value>true</value>
            </property>
        </activation>
        <build>
            <plugins>
                <plugin>
                    <groupId>com.jayway.maven.plugins.android.generation2</groupId>
                    <artifactId>android-maven-plugin</artifactId>
                    <version>${android-plugin}</version>
                    <configuration>
                        <release>true</release>
                    </configuration>
                </plugin>

                <plugin>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>enforce-signing-properties</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <requireProperty>
                                        <property>sign.keystore</property>
                                        <message>The 'sign.keystore' property is missing. It must
                                            contain the path to the
                                            keystore used to sign the
                                            application.
                                        </message>
                                    </requireProperty>
                                    <requireFilesExist>
                                        <files>
                                            <file>${sign.keystore}</file>
                                        </files>
                                        <message>The 'sign.keystore' property does not point to a
                                            file. It must contain the
                                            path to the keystore used to sign
                                            the application.
                                        </message>
                                    </requireFilesExist>
                                    <requireProperty>
                                        <property>sign.alias</property>
                                        <message>The 'sign.alias' property is missing. It must
                                            contain the key alias used to
                                            sign the application.
                                        </message>
                                    </requireProperty>
                                    <requireProperty>
                                        <property>sign.storepass</property>
                                        <message>The 'sign.storepass' property is missing. It must
                                            contain the password of
                                            the keystore used to sign the
                                            application.
                                        </message>
                                    </requireProperty>
                                    <requireProperty>
                                        <property>sign.keypass</property>
                                        <message>The 'sign.keypass' property is missing. It must
                                            contain the password of the
                                            key used to sign the application.
                                        </message>
                                    </requireProperty>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    </profile>
    <profile>
        <id>linux</id>
        <activation>
            <os>
                <family>unix</family>
            </os>
        </activation>
        <properties>
            <rt.jar.path>${java.home}/jre/lib/rt.jar</rt.jar.path>
            <jsse.jar.path>${java.home}/jre/lib/jsse.jar</jsse.jar.path>
        </properties>
    </profile>
    <!-- mac profile has to be after unix since running on mac will trigger 
        both -->
    <profile>
        <id>mac</id>
        <activation>
            <os>
                <family>mac</family>
            </os>
        </activation>
        <properties>
            <!-- absolute path -->
            <!--<rt.jar.path>/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/classes.jar</rt.jar.path> -->
            <!-- or with JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/ -->
            <rt.jar.path>${java.home}/../Classes/classes.jar</rt.jar.path>
            <jsse.jar.path>${java.home}/../Classes/jsse.jar</jsse.jar.path>
        </properties>
    </profile>
    <profile>
        <id>windows</id>
        <activation>
            <os>
                <family>windows</family>
            </os>
        </activation>
        <properties>
            <rt.jar.path>${java.home}/jre/lib/rt.jar</rt.jar.path>
            <jsse.jar.path>${java.home}/jre/lib/jsse.jar</jsse.jar.path>
        </properties>
    </profile>
</profiles>

Edit : updated pom. Edit : uploaded Log file

解决方案

Seems the problem was caused by a dependency not being resolved.

At first Maven did not even report this missing dependency, until I started removing things from my pom which I had added in an attempt to resolve this issue.

Now, what explains that the dependency didn't get auto-resolved, is the fact that there is no such artifact on the central maven repository.

As such, I added the following repository :

<repositories>
    <!-- For developing with Android ROME Feed Reader -->
    <repository>
        <id>android-rome-feed-reader-repository</id>
        <name>Android ROME Feed Reader Repository</name>
        <url>https://android-rome-feed-reader.googlecode.com/svn/maven2/releases</url>
    </repository>
</repositories>

Resulting in that 'hidden' dependency being resolved.

This dependency seems to be needed by the

    <!-- Needed for androidannotations REST interface-->
    <dependency>
        <groupId>org.springframework.android</groupId>
        <artifactId>spring-android-rest-template</artifactId>
        <version>${spring-android-version}</version>
    </dependency>

Spring docs report that this 'hidden dependency' of which we're speaking is needed for RSS and Atom feed support by the rest-template.

What made this even weirder is that the initial activity annotated by AA got created and resolved nicely. As long as I didn't refer to a generated class, e.g. for navigation, then it did compile and run. From the moment I tried to use a class_ in code however, it went down this path.

Hope this helps !

这篇关于Maven的+生成AndroidAnnotations但不可到达班的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆