Taskdef class com. Android. Ant. newsetuptask cannot be found

Source: Internet
Author: User

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" />...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.