The ADT and SDK are updated to the latest in the past two days, but the problem occurs during packaging. It is referenced in my ant file:
<!-- jar file from where the tasks are loaded --> <path id="android.antlibs"> <pathelement path="${sdk.dir}/tools/lib/anttasks.jar" /> </path> <!-- Custom tasks --> <taskdef name="setup" classname="com.android.ant.NewSetupTask" classpathref="android.antlibs" />
Later, I used JD-Gui to check whether com. Android. Ant. newsetuptask was found in anttasks. jar.
I didn't find it on the Internet, so I had to use my colleague's machine to upload the old anttasks. jar.
Is it moved to the jar package?
Compared with the code, it should be com. Android. Ant. newsetuptask which has been divided into several small classes: checkenvtask, gettypetask, gettargettask
Newsetuptask = checkenvtask + gettypetask + gettargettask +...
You have to break down the previous setup one by one, dizzy
Previous
<Setup
....
/>
===="
<Checkenvtask/>
<Gettypetask
Projecttypeout = "android. Project. Type"/>
<Gettargettask
Androidjarfileout = "android. Jar"
Androidaidlfileout = "android. aidl"
Targetapiout = "target. API"
Bootclasspathrefout = "android.tar get. classpath"/>
....
You can also refer to:/opt/android-sdk-linux_x86/tools/ANT/build. xml file, this is also updated
<!-- Pre build setup --> <target name="-build-setup" depends="-setup">....<!-- Basic Ant + SDK check --> <target name="-check-env"> <checkenv /> </target> <!-- target to disable building dependencies --> <target name="nodeps"> <property name="dont.do.deps" value="true" /> </target> <!-- generic setup --> <target name="-setup" depends="-check-env"> <echo level="info">Project Name: ${ant.project.name}</echo> <gettype projectTypeOut="project.type" />...