How to import android email source code into eclipse project?

后端 未结 2 1477
一个人的身影
一个人的身影 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.

    0 讨论(0)
  • 2021-02-11 04:59

    I faced the same issue with Email. I fixed the issue, by adding the following jars into the build path and thus, all the errors were resolved.

    ../out/target/common/obj/APPS/Email_intermediates/classes.jar
    ../out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes.jar
    

    But you need to make the Application build using the platform.

    0 讨论(0)
提交回复
热议问题