Twilio 如何解决 Failed resolution of: Lorg/apache/http/client/config/RequestConfig
Twilio how to solve Failed resolution of: Lorg/apache/http/client/config/RequestConfig
我正在尝试使用 Twilio 站点发送消息。
当我 运行 此代码时:
Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
com.twilio.rest.api.v2010.account.Message message =
com.twilio.rest.api.v2010.account.Message.creator(new PhoneNumber(phoneNumber),
new PhoneNumber("+******"),
message1).create();
我遇到这个错误:
Failed resolution of: Lorg/apache/http/client/config/RequestConfig
我看到了这个解决方案,但我不知道应该把它放在哪里:
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.4.1</version>
</dependency>
你能帮帮我吗?
此处为 Twilio 开发人员布道师。
我们不建议您直接从 Android 应用程序使用 Twilio REST API,因为攻击者反编译应用程序、检索您的帐户 sid 和身份验证令牌以及滥用您的帐户。
我的同事 Marcos 在 how to send SMS messages from an Android application 上写了一篇博客 post,我建议您听从他的建议。
我正在尝试使用 Twilio 站点发送消息。 当我 运行 此代码时:
Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
com.twilio.rest.api.v2010.account.Message message =
com.twilio.rest.api.v2010.account.Message.creator(new PhoneNumber(phoneNumber),
new PhoneNumber("+******"),
message1).create();
我遇到这个错误:
Failed resolution of: Lorg/apache/http/client/config/RequestConfig
我看到了这个解决方案,但我不知道应该把它放在哪里:
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.4.1</version>
</dependency>
你能帮帮我吗?
此处为 Twilio 开发人员布道师。
我们不建议您直接从 Android 应用程序使用 Twilio REST API,因为攻击者反编译应用程序、检索您的帐户 sid 和身份验证令牌以及滥用您的帐户。
我的同事 Marcos 在 how to send SMS messages from an Android application 上写了一篇博客 post,我建议您听从他的建议。