BigKarel / maven-android-plugin

Automatically exported from code.google.com/p/maven-android-plugin
0 stars 0 forks source link

maven-android-plugin version 3.8.2 creates the R.txt for ActionBarSherlock Outside the apk. Resulting in findById failing. #461

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using the ActionBarSherlock (ABS) library 4.4.0 and the maven-android-plugin 
3.8.2. Then performing a mvn clean install will result in the build out 
directory containing a R.txt file at the root. It appears that R.txt contains 
all the .xml files from the project which includes the ABS xml files.  

When running the application and it calls ABS class that do a findById it will 
return a null. For example

java.lang.NullPointerException
        at com.actionbarsherlock.widget.SearchView.<init>(SearchView.java:268)
        at com.actionbarsherlock.widget.SearchView.<init>(SearchView.java:252)

The line of code in ABS SearchView reads as follows:

line 267  mQueryTextView = (SearchAutoComplete) 
findViewById(R.id.abs__search_src_text);
line 268        mQueryTextView.setSearchView(this);

line 267 has mQueryTextView as null.

My current work around is to use maven-android-plugin 3.8.1

Original issue reported on code.google.com by john.con...@riptidesoftware.com on 30 Apr 2014 at 5:50

Attachments:

GoogleCodeExporter commented 9 years ago
We are no longer using the issue tracking system on Google Code. Please refile 
this issue on https://github.com/jayway/maven-android-plugin/issues if you 
still have this problem with the latest release of the Android Maven Plugin

Original comment by mosa...@gmail.com on 19 May 2014 at 4:20