android - Adding libs with resources via command line -
i'm trying accomplish http://developer.android.com/tools/support-library/setup.html#libs-with-res without using eclipse or gradle; however, official documentation doesn't support that. last couple hours, i've been googling can think of, i'm not finding helpful information.
specifically, i'm trying add support.v7.appcompat
library. i'm able add jar project, can't find way add relevant resources. keep getting java.lang.illegalstateexception: need use theme.appcompat theme (or descendant) activity.
though i've added android:theme="@style/theme.appcompat"
<manifest>
element of androidmanifest.xml
per 1 of earlier, seemingly-relevant search results. i've added android.library.reference.1=<sdk>/extras/android/support/v7/appcompat
local.properties
, no avail.
can please instruct me on how add library command line?
however, official documentation doesn't support that
the general android library project instructions should work fine.
i'm able add jar project
that's not supposed do.
i've added android.library.reference.1=<sdk>/extras/android/support/v7/appcompat local.properties, no avail.
that goes in project.properties
, not local.properties
. , needs relative path, crazy reason, make sure set way.
personally, i'd recommend budget time move gradle.
it turns out there 2 tiers of problems. in addition getting command-line build files set properly, theme wasn't registered quite right way.
if going directly reference theme.appcompat
in manifest, either:
- should on
<application>
element, or - should on every
<activity>
element activity inheritsappcompatactivity
or, if going stick own apptheme
inherits theme.appcompat
, need ensure adjust of relevant style resources. example, might adjust appbasetheme
in res/values/styles.xml
inherit theme.appcompat
(and have apptheme
inherits appbasetheme
), per commonly-generated code. however, there may definitions of appbasetheme
in other directories (e.g., res/values-v11/styles.xml
) need adjusted well.
Comments
Post a Comment