Android 使用Eclipse 構建K9

來源:互聯網
上載者:User
Building with Eclipse

You'll need Eclipse with the Android Development Tools plugin installed. Follow the full directions found here:http://developer.android.com/sdk/eclipse-adt.html#installing.
Make sure your Android SDK and ADT plugin are both up to date.

Building K-9 can take up to 1 GB of memory. You have to allow Eclipse to use this amount of memory or you will get out-of-memory errors when the Android compilers are run. In order to do this, edit your eclipse.ini file and make sure the following
arguments are present: -vmargs -Xms128m -Xmx1024m

You can also pass these parameters to Eclipse on the command line.

To set up Eclipse to build K-9 Mail we need two projects. The first one is the ActionBarSherlock project and the second one is K-9 Mail. We'll set them up in that order too:

  1. Open Eclipse and choose File->New->Project
  2. Choose Android Project
  3. Select Create project from existing source and then browse to PROJECTFOLDER/plugins/ActionBarSherlock/library folder.
  4. Finish the wizard, then right click on the newly created project in the Package Explorer and select 'properties'.
  5. Under the Android options, you see a section 'Library' with a checkbox IsLibrary. Make sure that's checked.
  6. Clean and build this library project.
  7. Select Create project from existing source and then browse to PROJECTFOLDER/plugins/Android-PullToRefresh/library folder.
  8. Finish the wizard, then right click on the newly created project in the Package Explorer and select 'properties'.
  9. Under the Android options, you see a section 'Library' with a checkbox IsLibrary. Make sure that's checked.
  10. Clean and build this library project.

  11. Inside your PROJECTFOLDER, make sure you have a directory named 'gen'

  12. From Eclipse, File > Import

  13. Under General, select 'Existing Projects into Workspace' and click Next

  14. Next to 'Select root directory', Browse to your K-9 working copy

  15. Click Finish

  16. In the Package Explorer, right click 'k9mail' and click 'Properties'

  17. Select 'Android' again and then click 'Add'.

  18. Now add the previously created library project to this project.

  19. Select 'Java Compiler'

  20. Check 'Enable project specific settings'

  21. Set the 'Compiler compliance level' to 1.6

  22. Click OK

You should now be able to build the project. If it had been built previously, make sure you clean it first. If you get errors about missing translation information for some locales, go to Project -> Properties -> Android Lint Settings and change
the severity of MissingTranslations to Warning.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.