How to change target build on Android project?

后端 未结 13 559
傲寒
傲寒 2020-12-04 11:01

I currently have an Android project in Eclipse.

I created it with a target build of 1.5 (sdk 3).

Now I want to change it so that it has a minSdk of 3 and tar

相关标签:
13条回答
  • 2020-12-04 11:03

    right click on project->properties->android->select target name --set target-- click ok

    0 讨论(0)
  • 2020-12-04 11:10
    1. You can change your the Build Target for your project at any time:

      Right-click the project in the Package Explorer, select Properties, select Android and then check the desired Project Target.

    2. Edit the following elements in the AndroidManifest.xml file (it is in your project root directory)

      In this case, that will be:

      <uses-sdk android:minSdkVersion="3" />
      <uses-sdk android:targetSdkVersion="8" />
      

      Save it

    3. Rebuild your project.

      Click the Project on the menu bar, select Clean...

    4. Now, run the project again.

      Right Click Project name, move on Run as, and select Android Application

    By the way, reviewing Managing Projects from Eclipse with ADT will be helpful. Especially the part called Creating an Android Project.

    0 讨论(0)
  • 2020-12-04 11:10

    There are three ways to resolve this issue.

    1. Right click the project and click "Properties". Then select "Android" from left. You can then select the target version from right side.

    2. Right Click on Project and select "run as" , then a drop down list will be open.
      Select "Run Configuration" from Drop Down list.Then a form will be open , Select "Target" tab from "Form" and also select Android Version Api , On which you want to execute your application, it is a fastest way to check your application on different Target Version.

    3. Edit the following elements in the AndroidManifest.xml file

    xml:

    <uses-sdk android:minSdkVersion="3" />
    <uses-sdk android:targetSdkVersion="8" />
    
    0 讨论(0)
  • 2020-12-04 11:12

    to get sdk 29- android 10:

    Click Tools > SDK Manager.

    In the SDK Platforms tab, select Android 10 (29).

    In the SDK Tools tab, select Android SDK Build-Tools 29 (or higher).

    Click OK to begin install.

    0 讨论(0)
  • 2020-12-04 11:13

    The file default.properties is by default read only, changing that worked for me.

    0 讨论(0)
  • 2020-12-04 11:17

    You should not have multiple "uses-sdk" tags in your file. ref - docs

    Use this syntax:
        <uses-sdk android:minSdkVersion="integer"
              android:targetSdkVersion="integer"
              android:maxSdkVersion="integer" />
    
    0 讨论(0)
提交回复
热议问题