Skip to content

Commit 4e0c46d

Browse files
peterlew0-8-15
authored andcommitted
ANDROID: Moved support-v4 unzip location
classes.jar will now be unzipped to android/support if necessary.
1 parent 0310d74 commit 4e0c46d

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

targets/android/build-binary

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -179,23 +179,21 @@ else
179179
# If a directory is found, check if classes.jar has already been extracted. If not, extract it from the AAR
180180
if [ ! "X$v4dir" = "X" ]; then
181181
v4file=`find $v4dir -name classes.jar`
182+
if [ ! -s "$v4file" ]; then
183+
if [ -d $SYS_PREFIXROOT/android/support ]; then
184+
v4file=`find $SYS_PREFIXROOT/android/support -name $supportv4version-classes.jar`
185+
fi
186+
fi
182187
if [ ! -s "$v4file" ]; then
183188
v4aar=`find $v4dir -name support-v4*.aar`
184189
if [ -s "$v4aar" ]; then
185-
if [ -w $v4dir ]; then
186-
echo "WARNING: extracting classes from" $v4aar " in directory $v4dir"
187-
unzip $v4aar classes.jar -d $v4dir > /dev/null
188-
v4file=`find $v4dir -name classes.jar`
189-
else
190-
echo Directory $v4dir "is not writable, please run the follwong manually:"
191-
echo '"' unzip $v4aar classes.jar -d $v4dir "'"
192-
exit 1
193-
fi
190+
unzip $v4aar classes.jar -d $SYS_PREFIXROOT/android/support > /dev/null && mv $SYS_PREFIXROOT/android/support/classes.jar $SYS_PREFIXROOT/android/support/$supportv4version-classes.jar
191+
v4file=`find $SYS_PREFIXROOT/android/support -name $supportv4version-classes.jar`
194192
fi
195193
fi
196194
# If a classes.jar file has been found, copy it to libs
197195
if [ -s "$v4file" ]; then
198-
cp -r $v4file $tmpdir/libs
196+
cp -r $v4file $tmpdir/libs/classes.jar
199197
echo " => support-v4 library loaded (version $supportv4version)"
200198
else
201199
echo " => warning: support-v4 library not found"

0 commit comments

Comments
 (0)