我想在谷歌最新的自定义搜索中以 json 数组的形式获得谷歌搜索结果。
如何实现代码。
例如 :
{
"responseData": {` `
"results": [
{
` ` "GsearchResultClass ": "GwebSearch",
"unescapedUrl": "http:/ / en.wikipedia.org/wiki/Paris_Hilton",
"url" : "http :// en.wikipedi a.org/wiki/Paris_Hilton",
"visibleUrl " : "en.wikipedia .org",
"cacheUrl " : "http://www.google.com/search?q=cache:TwrPfhd22hYJ:en.wikipedia.org",
"title": "< b>Paris Hilton</b > - Wikipedia, the free encyclopedia",
"titleNoFormatting": "Paris Hilton - Wikipedia, the free encyclopedia",
"content": "[1] In 2006, she released her debut album..."
},
{
"GsearchResultClass": "GwebSearch",
"unescapedUrl": "http://` `www.imdb.com/name/nm0385296/",
"url": "http://` `www.imdb.com/name/nm0385296/",
"visibleUrl": "www.imdb.com",
"cacheUrl": "http://www.google.com/search?q=cache:1i34KkqnsooJ:www.imdb.com",
"title": "<b> …Run Code Online (Sandbox Code Playgroud) 下面是我的build.gradle文件中的代码.
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '24.0.0'
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.test"
minSdkVersion 19
targetSdkVersion 19
jackOptions {
enabled true
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles 'proguard.cfg'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
incremental false
}
dexOptions {
dexInProcess false
}
}
dependencies {
compile files('libs/StartAppInApp-3.4.2.jar')
compile 'com.google.code.gson:gson:2.6.1'
compile 'com.squareup.okio:okio:1.6.0'
compile 'com.squareup.okhttp:okhttp:2.7.0'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.facebook.android:audience-network-sdk:4.+'
}
Run Code Online (Sandbox Code Playgroud)
当我使用gradle文件同步项目时,它给了我错误.
Error:(33, 13) Failed to resolve: com.facebook.android:audience-network-sdk:4.+
Run Code Online (Sandbox Code Playgroud)
谁能告诉我为什么我会收到这个错误?