How to import android email source code into eclipse project?

后端 未结 2 1479
一个人的身影
一个人的身影 2021-02-11 04:08

I downloaded the android Email app source code [version 2.2] from here. I deleted the .classpath and .project file so that I could import an existing android project. Everything

2条回答
  •  青春惊慌失措
    2021-02-11 04:49

    Many of the included applications cannot(or at least could not) be built with the SDK, as they depend(ed) on non-exported functionality that is only "visible" during the system build. I'm not sure if Email is still in this category, but it was in the cupcake days.

    There are three potential workarounds. Best is to rewrite those parts of the application to instead use functionality which is exported in the SDK, and thus fairly stable.

    Next up is to use reflection to pick up the missing pieces at runtime.

    Last is to make do-nothing dummy classes for the needed non-public platform pieces, within your project. These are enough to let the program compile, and at runtime they get rejected due to name collisions with the hidden system functionality, so you end up utilizing the real classes rather than the dummies.

    The proper thing to do is to build the application with the platform build system, rather than the SDK.

提交回复
热议问题