Domanda

I'm using visual studio to compile ndk part and ant script to compile java part.

this is my build.xml

<project name="ProjectTemplate" >
<property name="androidjar.dir"  value="e:\android\sdk\platforms\android-10"/>
<property name="annotationjar.dir"  value="e:\android\sdk\tools\support"/>
<property name="facebookjar.dir"  value="D:\Dev\Workspace\Depot\Source\GameApplication\lib"/>
<property name="build.dir" value="D:\Dev\Workspace\Depot\Source\GameApplication\classes"/>
<property name="src.dir" value="D:\Dev\Workspace\Depot\Source\GameApplication\com"/>

<path id="master-classpath">
    <fileset dir="${androidjar.dir}">
        <include name="android.jar"/>
    </fileset>
    <fileset dir="${facebookjar.dir}">
        <include name="*.jar"/>
    </fileset>
    <fileset dir="${annotationjar.dir}">
        <include name="annotations.jar"/>
    </fileset>
    <pathelement path="${build.dir}"/>
</path>

<target name="compile">
    <mkdir dir="${build.dir}"/>
    <javac destdir="${build.dir}">
        <src path="${src.dir}"/>
        <classpath refid="master-classpath"/>
    </javac>
</target>

D:\Dev\Workspace\Depot\Source\GameApplication\com contains my java code and facebook sdk source code.This is my naive try to include the library project of facebook sdk as I don't know how to properly include a library project in ant build.

I don't even know if it could be related to the problem.

facebook.jar is in facebookjar.dir both with android-support-v4.jar

Compilation part seem to go well as far as I can understand as i'm very new to android sdk , java and ant.You can see compilation results in log

On resource packing I get many errors from aapt

I have many errors like this :

error : 9-patch image malformed.No marked region found along edge.Found along top edge.

and many other like this

..\..\Data\Common\Android\layout\com_facebook_friendpickerfragment.xml:25: error: Error: No resource found that matches the given name (at 'divider' with value '@drawable/com_facebook_list_divider').

where the resource not found is a 9-patch image that caused an error previously.

even if those images results malformed facebook sdk every other user uses them normally and they get packed correctly in facebook samples i tested with my android toolchain.

full log listingto see all the compilation log of the app.

È stato utile?

Soluzione

In the end the problem has been solved reverting to a more standard Android deploy workflow. Making a project in eclipse for the java part and making use of standard ant script android sdk come with.

I also properly included facebook sdk as a library project not merging the sources(i did also it for the other workflow but it doesn't helped).

I still continue to not understand the differences between the two builds as they both uses the same aapt and possibly with same arguments, but one get the errors the other works like a charm.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top