简体   繁体   中英

How to add android SDK to eclipse project?

I'm trying to re-compile android app from sources using Eclipse STS. I added the sources to plain new project. I ended up with missing dependencies for classes from android.* package.

To solve this, I decided to locate android SDK on my disk drive and use the Project properties -> Java Build Path -> Source -> Link source. There I selected path to the android SDK.

But this would produce lots of build errors for missing types, such as

The import android.databinding.testapp.databinding cannot be resolved

I think what I did is not the correct way to include the SDK anyway.

What is the correct way to compile your Java code that uses Android SDK?

如果您想继续使用Eclipse / STS进行Android开发,可以试试Andmore: https ://projects.eclipse.org/projects/tools.andmore

Try to download it from kickass torrent. After that go to your project -> right button -> properties -> android, and select the path where you have saved the android sdk.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM