1.I will explain how to use the three-party SDK smart deployment tool by implementing the Twitter login SDK
The first is to post Twitter related documents and native examples
Development document address
https://dev.twitter.com/twitterkit/overview
How to use Android SDK
https://dev.twitter.com/twitterkit/android/installation
Sample download address:
https://github.com/twitter/twitter-kit-android
2.Download the Android SDK for Twitter
Mainly twitter-core.aar
Others are dependent packages
3.Download the three-party SDK smart deployment tool
Compiled:
http://www.orangeui.cn/download/sdk/OrangeSDK_SmartDeploy.zip
Or download the source code and compile it yourself:
https://github.com/DelphiTeacher/OrangeFreeSDK
The interface of the three-party SDK smart deployment tool is as follows:
4.First click the “Select Project” button to select the project to be configured
5.Then click the “Add Android Jar” button to add all jars, and then click “Process Android Jar”
Click the “Add Android Aar” button, add the desired aar, and then click “Process Android Aar”
Jar and aar have been added to the project
The Aar package is also decompressed, and the resources in it are deployed to the project
6.Next, translate the jar into a Delphi calling unit, call it in the form, first create a Twitter button and display it on the form
Button“Create Login Button”
Button “Get user info”
7.Then run to the real machine to check the effect, click “Create Login Button”, an exception will pop up,
Because the aar package needs to access the resources in its own package, we need to generate the R.java of the aar package and package it into a jar to add to the project.
You need to click the “Generate R.jar” button
It will generate R.jar and add it to the project
8.Compile and run to the real machine to see the effect
9.If the resource file deployment of the project has been changed, you need to click the “Generate R.jar” button again. If you find this troublesome, you can use OrangeSDKHelper.exe to automatically handle it.
Configure Post-build events in the project as:
“C:\OrangeFreeSDK\OrangeSDKSmartDeployment\Win32\Debug\OrangeSDKHelper.exe” $(PROJECTPATH)
After each compilation, you can view related information in the Output page