[英]How do I use Solana.kt library in Android project?
I'm trying to import Solana.kt library - https://github.com/ajamaica/Solana.kt into my android project, so I could try creating solana wallet/sending tokens.我正在尝试将 Solana.kt 库 - https://github.com/ajamaica/Solana.kt导入到我的 android 项目中,因此我可以尝试创建 solana 钱包/发送令牌。 I'm noob, so I can't figure out how do I go exactly adding library into the project and then how to I use it?我是菜鸟,所以我不知道如何将库准确地添加到项目中,然后如何使用它? (For example from my MainActivity I want to click button to create wallet). (例如,从我的 MainActivity 我想单击按钮来创建钱包)。 Library code is like this -库代码是这样的 -
So my main questions are所以我的主要问题是
I think it helps to include the local SDK to your own project:我认为将本地 SDK 包含到您自己的项目中会有所帮助:
solana
folder to your main project folder ( ctrl+c & ctrl+v )将solana
文件夹复制到您的主项目文件夹( ctrl+c & ctrl+v )include ':app', ':solana'
project(':solana').projectDir = new File(settingsDir, 'solana')
build.gradle
file and put this:之后打开应用程序build.gradle
文件并输入: implementation project(path: ':solana')
If your version of configure files are suitable with sdk files, this should work如果您的配置文件版本适用于 sdk 文件,这应该可以
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.