Twitter4j - 导入问题 - AndroidStudio
Twitter4j - import issue - AndroidStudio
我已经将 Eclipse 示例迁移到 Androidstudio gradle 类型的项目。
我已将 twitter4j 库添加到模块 build.gradle:
dependencies {
compile 'org.twitter4j:twitter4j:4.0.3'
compile 'org.twitter4j:twitter4j-core:4.0.3'
compile 'com.twitter:hbc-twitter4j-v3:1.4.2'
compile 'org.twitter4j:twitter4j-http2-support:4.0.3'
}
它正在导入 twitter4j 类,但不是这些:
import twitter4j.http.AccessToken;
import twitter4j.http.RequestToken;
它说无法解析符号http
我试过导入 twitter4j.http 但我就是无法让它工作。
我正在使用:
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
}
任何人都可以阐明这一点吗?
我已经找了几个小时了,但还没有解决方案:(
提前致谢!
AccessToken is in the twitter4j.auth
package. I assume there is a similar problem with your other classes. It appears that the package structure has been rearranged from earlier versions. I suggest you bookmark the twitter4j JavaDocs 并定期参考它们。
我已经将 Eclipse 示例迁移到 Androidstudio gradle 类型的项目。
我已将 twitter4j 库添加到模块 build.gradle:
dependencies {
compile 'org.twitter4j:twitter4j:4.0.3'
compile 'org.twitter4j:twitter4j-core:4.0.3'
compile 'com.twitter:hbc-twitter4j-v3:1.4.2'
compile 'org.twitter4j:twitter4j-http2-support:4.0.3'
}
它正在导入 twitter4j 类,但不是这些:
import twitter4j.http.AccessToken;
import twitter4j.http.RequestToken;
它说无法解析符号http
我试过导入 twitter4j.http 但我就是无法让它工作。
我正在使用:
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
}
任何人都可以阐明这一点吗?
我已经找了几个小时了,但还没有解决方案:(
提前致谢!
AccessToken is in the twitter4j.auth
package. I assume there is a similar problem with your other classes. It appears that the package structure has been rearranged from earlier versions. I suggest you bookmark the twitter4j JavaDocs 并定期参考它们。