simpligility / android-maven-plugin

Maven Plugin for Android Application development and more
http://simpligility.github.io/android-maven-plugin/
Apache License 2.0
1.05k stars 394 forks source link

No resource identifier found for attribute #420

Closed Shusshu closed 10 years ago

Shusshu commented 10 years ago

Using custom xmlns and using attributes from a library in the layout of the apk causes this problem

Sample: https://github.com/Shusshu/helloflashlight-issue-420

See issue.xml for the actual "problem" & pom.xml for dependency

william-ferguson-au commented 10 years ago

OK, I can't find

<dependency>
       <groupId>com.sothree.slidinguppanel</groupId>
       <artifactId>slidinguppanel</artifactId>
       <version>1.0.0.20140430</version>
       <type>aar</type>
</dependency>

But I did find:

    <dependency>
      <groupId>com.sothree.slidinguppanel</groupId>
      <artifactId>library</artifactId>
      <version>1.0.1</version>
      <type>aar</type>
    </dependency>

But that won't build because it has invalid + symbols as version specifiers.

Shusshu commented 10 years ago

Oups yeah I made it myself and placed it in the company repository. Would it be OK if I upload the dep and pom and you place it in you local repo? On 4 Aug 2014 07:59, "William Ferguson" notifications@github.com wrote:

OK, I can't find

com.sothree.slidinguppanel slidinguppanel 1.0.0.20140430 aar

But I did find:

<dependency>
  <groupId>com.sothree.slidinguppanel</groupId>
  <artifactId>library</artifactId>
  <version>1.0.1</version>
  <type>aar</type>
</dependency>

But that won't build because it has invalid + symbols as version specifiers.

— Reply to this email directly or view it on GitHub https://github.com/jayway/maven-android-plugin/issues/420#issuecomment-51020218 .

william-ferguson-au commented 10 years ago

Sure

On Mon, Aug 4, 2014 at 4:56 PM, Benoit Billington notifications@github.com wrote:

Oups yeah I made it myself and placed it in the company repository. Would it be OK if I upload the dep and pom and you place it in you local repo? On 4 Aug 2014 07:59, "William Ferguson" notifications@github.com wrote:

OK, I can't find

com.sothree.slidinguppanel slidinguppanel 1.0.0.20140430 aar

But I did find:

com.sothree.slidinguppanel library 1.0.1 aar

But that won't build because it has invalid + symbols as version specifiers.

— Reply to this email directly or view it on GitHub < https://github.com/jayway/maven-android-plugin/issues/420#issuecomment-51020218>

.

— Reply to this email directly or view it on GitHub https://github.com/jayway/maven-android-plugin/issues/420#issuecomment-51023508 .

Shusshu commented 10 years ago

https://www.sendspace.com/file/z2zwpp

william-ferguson-au commented 10 years ago

OK, so when I build this I get:

[INFO] ------------------------------------------------------------------------
[INFO] Building HelloFlashlight 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ helloflashlight ---
[INFO] Deleting d:\Source\3rdParty\helloflashlight-issue-420\target
[INFO]
[INFO] --- android-maven-plugin:3.9.0-rc.3:generate-sources (default-generate-sources) @ helloflashlight ---
[INFO] Extracting libs
[INFO] Extracting aar slidinguppanel...
[INFO] Generating R file for com.simpligility.android:helloflashlight:apk:1.0.0
[INFO] d:\Source\3rdParty\helloflashlight-issue-420\res\layout\issue.xml:8: error: No resource identifier found for attribute 'indicatorHeight' in package 'com.simpligility.android.helloflashlight'
[INFO] d:\Source\3rdParty\helloflashlight-issue-420\res\layout\issue.xml:8: error: No resource identifier found for attribute 'tabTextAllCaps' in package 'com.simpligility.android.helloflashlight'
[INFO] d:\Source\3rdParty\helloflashlight-issue-420\res\layout\issue.xml:8: error: No resource identifier found for attribute 'underlineColor' in package 'com.simpligility.android.helloflashlight'
[INFO] d:\Source\3rdParty\helloflashlight-issue-420\res\layout\issue.xml:8: error: No resource identifier found for attribute 'shouldExpand' in package 'com.simpligility.android.helloflashlight'
[ERROR] Error when generating sources.
org.apache.maven.plugin.MojoExecutionException:
        at com.jayway.maven.plugins.android.phase01generatesources.GenerateSourcesMojo.generateR(GenerateSourcesMojo.java:745)

Which is exactly what I would expect because none of those resource identifiers have been declared anywhere. What were you expecting?

william-ferguson-au commented 10 years ago

More to the point, where is it supposed to resolve com.astuetz.viewpager.extensions.PagerSlidingTabStrip in issues.xml from?

Shusshu commented 10 years ago

Oups, yes that aar build does not have attrs.

And looking at the latest from the repo: https://github.com/astuetz/PagerSlidingTabStrip/blob/master/library/res/values/attrs.xml They have diff names so that should work.

I should have checked more.

com.astuetz.viewpager.extensions.PagerSlidingTabStrip comes from the aar but they changed it since I made that version.

I'll remake a version which compiles (unlike the one from github because of the + dep)

Thx

Shusshu commented 10 years ago

My lib was a bit different it included features which were not pulled yet: https://github.com/Shusshu/PagerSlidingTabStrip/commits/shusshu-master