Android壁纸应用程序错误提取JSON

时间:2017-07-25 09:36:36

标签: java android json

我正在尝试制作一个壁纸应用程序。我试图使用之前称为picasa的谷歌照片中的json来获取照片。

我把专辑公开制作了他们

我正在关注GeekMentors

的教程

当我运行geekmentors提供的源代码时,我能够在我的应用程序上获取壁纸,但是当我运行替换用户ID 公共静态最终字符串PICASA_USER =" freewallpapersapp&#34 ;; 公共静态最终字符串PICASA_USER =" fbphotocomments&#34 ;; APPConst.java 中显示错误但不提取照片。

请帮帮我:)

AppConst.java

package com.geekmentors.wallpaperfreeapp.app;

/**
 * Created by geekmentors on 1/26/16.
 */
public class AppConst {
    // Number of columns of Grid View
    // by default 2 but user can configure this in settings activity
    public static final int NUM_OF_COLUMNS = 2;

    // Gridview image padding
    public static final int GRID_PADDING = 0; // in dp

    // Gallery directory name to save wallpapers
    public static final String SDCARD_DIR_NAME = "Awesome Wallpapers";

    // Picasa/Google web album username
    public static final String PICASA_USER = "freewallpapersapp";
**strong text**
    // Public albums list url
    public static final String URL_PICASA_ALBUMS = "https://picasaweb.google.com/data/feed/api/user/_PICASA_USER_?kind=album&alt=json";

    // Picasa album photos url
    public static final String URL_ALBUM_PHOTOS = "https://picasaweb.google.com/data/feed/api/user/_PICASA_USER_/albumid/_ALBUM_ID_?alt=json";

    // Picasa recenlty added photos url
    public static final String URL_RECENTLY_ADDED = "https://picasaweb.google.com/data/feed/api/user/_PICASA_USER_?kind=photo&alt=json";
}

Geek Mentor Log Cat

07-25 14:52:08.373 24105-24105/? E/libprocessgroup: failed to make and chown /acct/uid_10075: Read-only file system
07-25 14:52:08.373 24105-24105/? W/Zygote: createProcessGroup failed, kernel missing CONFIG_CGROUP_CPUACCT?
07-25 14:52:08.373 24105-24105/? I/art: Not late-enabling -Xcheck:jni (already on)
07-25 14:52:08.529 24105-24120/com.geekmentors.wallpaperfreeapp I/art: Background sticky concurrent mark sweep GC freed 2030(126KB) AllocSpace objects, 2(32KB) LOS objects, 0% free, 97MB/97MB, paused 9.294ms total 35.114ms
07-25 14:52:08.705 24105-24105/com.geekmentors.wallpaperfreeapp D/SplashActivity: Albums request url: https://picasaweb.google.com/data/feed/api/user/freewallpapersapp?kind=album&alt=json
07-25 14:52:08.751 24105-24141/com.geekmentors.wallpaperfreeapp D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
07-25 14:52:08.760 24105-24105/com.geekmentors.wallpaperfreeapp D/Atlas: Validating map...
07-25 14:52:08.822 24105-24141/com.geekmentors.wallpaperfreeapp I/OpenGLRenderer: Initialized EGL, version 1.4
07-25 14:52:08.824 24105-24141/com.geekmentors.wallpaperfreeapp W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
07-25 14:52:08.869 24105-24141/com.geekmentors.wallpaperfreeapp D/OpenGLRenderer: Enabling debug mode 0
07-25 14:52:12.595 24105-24137/com.geekmentors.wallpaperfreeapp D/Volley: [194] BasicNetwork.logSlowRequests: HTTP response for request=<[ ] https://picasaweb.google.com/data/feed/api/user/freewallpapersapp?kind=album&alt=json 0x16731b0b NORMAL 1> [lifetime=3869], [size=14930], [rc=200], [retryCount=0]
07-25 14:52:21.640 24105-24105/com.geekmentors.wallpaperfreeapp D/SplashActivity: Albums Response: {"version":"1.0","encoding":"UTF-8","feed":{"xmlns":"http:\/\/www.w3.org\/2005\/Atom","xmlns$openSearch":"http:\/\/a9.com\/-\/spec\/opensearchrss\/1.0\/","xmlns$gphoto":"http:\/\/schemas.google.com\/photos\/2007","xmlns$media":"http:\/\/search.yahoo.com\/mrss\/","id":{"$t":"https:\/\/picasaweb.google.com\/data\/feed\/api\/user\/freewallpapersapp"},"updated":{"$t":"2017-03-26T00:59:41.696Z"},"category":[{"scheme":"http:\/\/schemas.google.com\/g\/2005#kind","term":"http:\/\/schemas.google.com\/photos\/2007#user"}],"title":{"$t":"110644481603920697983","type":"text"},"subtitle":{"$t":"","type":"text"},"icon":{"$t":"https:\/\/lh3.googleusercontent.com\/-39nejMr_9fg\/AAAAAAAAAAA\/AAAAAAAAAAA\/CLHWqpDNnl4\/s64-c\/110644481603920697983.jpg"},"link":[{"rel":"http:\/\/schemas.google.com\/g\/2005#feed","type":"application\/atom+xml","href":"https:\/\/picasaweb.google.com\/data\/feed\/api\/user\/110644481603920697983?alt=json"},{"rel":"alternate","type":"text\/html","href":"https:\/\/picasaweb.google.com\/110644481603920697983"},{"rel":"http:\/\/schemas.google.com\/photos\/2007#slideshow","type":"application\/x-shockwave-flash","href":"https:\/\/photos.gstatic.com\/media\/slideshow.swf?host=picasaweb.google.com&RGB=0x000000&feed=https:\/\/picasaweb.google.com\/data\/feed\/api\/user\/110644481603920697983?alt%3Drss"},{"rel":"self","type":"application\/atom+xml","href":"https:\/\/picasaweb.google.com\/data\/feed\/api\/user\/110644481603920697983?alt=json&start-index=1&max-results=1000&kind=album"}],"author":[{"name":{"$t":"Free Wallpapers"},"uri":{"$t":"https:\/\/picasaweb.google.com\/110644481603920697983"}}],"generator":{"$t":"Picasaweb","version":"1.00","uri":"http:\/\/picasaweb.google.com\/"},"openSearch$totalResults":{"$t":7},"openSearch$startIndex":{"$t":1},"openSearch$itemsPerPage":{"$t":1000},"gphoto$user":{"$t":"110644481603920697983"},"gphoto$nickname":{"$t":"Free Wallpapers"},"gphoto$thumbnail":{"$t":"https:\/\/lh3.googleusercontent.com\/-39nejMr_9fg\/AAAAAAAAAAA\/AAAAAAAAAAA\/CLHWqpDNnl4\/s64-c\/110644481603920697983.jpg"},"entry":[{"id":{"$t":"https:\/\/picasaweb.google.com\/data\/entry\/api\/user\/110644481603920697983\/albumid\/6044169237520279841?alt=json"},"published":{"$t":"2014-08-05T07:00:00.000Z"},"updated":{"$t":"2014-08-19T08:36:24.323Z"},"category":[{"scheme":"http:\/\/schemas.google.com\/g\/2005#kind","term":"http:\/\/schemas.google.com\/photos\/2007#album"}],"title":{"$t":"Movies","type":"text"},"summary":{"$t":"","type":"text"},"rights":{"$t":"public","type":"text"},"link":[{"rel":"http:\/\/schemas.google.com\/g\/2005#feed","type":"application\/atom+xml","href":"https:\/\/picasaweb.google.com\/data\/feed\/api\/user\/110644481603920697983\/albumid\/6044169237520279841?alt=json"},{"rel":"alternate","type":"text\/html","href":"https:\/\/picasaweb.google.com\/110644481603920697983\/Movies"},{"rel":"self","type":"application\/atom+xml","href":"https:\/\/picasaweb.google.com\/data\/entry\/api\/user\/110644481603920697983\/albumid\/6044169237520279841?alt=json"}],"author":[{"name":{"$t":"Free Wallpapers"},"uri":{"$t":"https:\/\/picasaweb.google.com\/110644481603920697983"}}],"gphoto$id":{"$t":"6044169237520279841"},"gphoto$name":{"$t":"Movies"},"gphoto$location":{"$t":""},"gphoto$access":{"$t":"public"},"gphoto$timestamp":{"$t":"1407222000000"},"gphoto$numphotos":{"$t":12},"gphoto$user":{"$t":"110644481603920697983"},"gphoto$nickname":{"$t":"Free Wallpapers"},"media$group":{"media$content":[{"url":"https:\/\/lh3.googleusercontent.com\/-8TAgvOgoliM\/U-Ez5ey9aSE\/AAAAAAAAAbU\/h19IhFCUl0EDGL7N-JFJBrgvD7_iNMCoQCHMYCg\/Movies","type":"image\/jpeg","medium":"image"}],"media$credit":[{"$t":"Free Wallpapers"}],"media$description":{"$t":"","type":"plain"},"media$keywords":{},"media$thumbnail":[{"url":"https:\/\/lh3.googleusercontent.com\/-8TAgvOgoliM\/U-Ez5ey9aSE\/AAAAAAAAAbU\/h19IhFCUl0EDGL7N-JFJBrgvD7_iNMCoQCHMYCg\/s160-c\/Movies","height":160,"width":160}],"media$title":{"$t":"Movies","type":"plain"}}},{"id":{"$t":"https:\/\/picasaweb.google.com\/data\/entry\/api\/us
07-25 14:52:21.641 24105-24105/com.geekmentors.wallpaperfreeapp D/SplashActivity: Album Id: 6044169237520279841, Album Title: Movies No Of Photos it has 12
07-25 14:52:21.641 24105-24105/com.geekmentors.wallpaperfreeapp D/SplashActivity: Album Id: 6044179913200717377, Album Title: Animals No Of Photos it has 16
07-25 14:52:21.642 24105-24105/com.geekmentors.wallpaperfreeapp D/SplashActivity: Album Id: 6044180077134056849, Album Title: Creative No Of Photos it has 12
07-25 14:52:21.642 24105-24105/com.geekmentors.wallpaperfreeapp D/SplashActivity: Album Id: 6044180155439960209, Album Title: Celebrities No Of Photos it has 26
07-25 14:52:21.642 24105-24105/com.geekmentors.wallpaperfreeapp D/SplashActivity: Album Id: 6044180226092557377, Album Title: Food No Of Photos it has 17
07-25 14:52:21.642 24105-24105/com.geekmentors.wallpaperfreeapp D/SplashActivity: Album Id: 6044180294600141585, Album Title: Nature No Of Photos it has 11
07-25 14:52:21.642 24105-24105/com.geekmentors.wallpaperfreeapp D/SplashActivity: Album Id: 6044180349698771009, Album Title: Vintage No Of Photos it has 12
07-25 14:52:21.657 24105-24105/com.geekmentors.wallpaperfreeapp D/PrefManager: Albums: [{"id":"6044169237520279841","photoNo":"12","title":"Movies"},{"id":"6044179913200717377","photoNo":"16","title":"Animals"},{"id":"6044180077134056849","photoNo":"12","title":"Creative"},{"id":"6044180155439960209","photoNo":"26","title":"Celebrities"},{"id":"6044180226092557377","photoNo":"17","title":"Food"},{"id":"6044180294600141585","photoNo":"11","title":"Nature"},{"id":"6044180349698771009","photoNo":"12","title":"Vintage"}]
07-25 14:52:30.401 24105-24105/com.geekmentors.wallpaperfreeapp W/ResourcesManager: Asset path '/system/framework/com.android.media.remotedisplay.jar' does not exist or contains no resources.
07-25 14:52:30.401 24105-24105/com.geekmentors.wallpaperfreeapp W/ResourcesManager: Asset path '/system/framework/com.android.location.provider.jar' does not exist or contains no resources.
07-25 14:52:30.455 24105-24105/com.geekmentors.wallpaperfreeapp D/DynamitePackage: Instantiated singleton DynamitePackage.
07-25 14:52:30.456 24105-24105/com.geekmentors.wallpaperfreeapp D/DynamitePackage: Instantiating com.google.android.gms.ads.ChimeraAdManagerCreatorImpl
07-25 14:52:30.484 24105-24469/com.geekmentors.wallpaperfreeapp W/DynamiteModule: Failed to load module via V2: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.dynamite.DynamiteModule$DynamiteLoaderClassLoader" on path: DexPathList[[zip file "/data/app/com.geekmentors.wallpaperfreeapp-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
07-25 14:52:30.489 24105-24469/com.geekmentors.wallpaperfreeapp I/DynamiteModule: Considering local module com.google.android.gms.piccard.dynamite:0 and remote module com.google.android.gms.piccard.dynamite:12
07-25 14:52:30.489 24105-24469/com.geekmentors.wallpaperfreeapp I/DynamiteModule: Selected remote version of com.google.android.gms.piccard.dynamite, version >= 12
07-25 14:52:30.629 24105-24469/com.geekmentors.wallpaperfreeapp I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
07-25 14:52:30.688 24105-24476/com.geekmentors.wallpaperfreeapp W/art: Long monitor contention event with owner method=java.lang.Class dalvik.system.DexFile.defineClassNative(java.lang.String, java.lang.ClassLoader, long) from DexFile.java:4294967294 waiters=3 for 144ms
07-25 14:52:30.692 24105-24105/com.geekmentors.wallpaperfreeapp I/Ads: Starting ad request.
07-25 14:52:30.726 24105-24105/com.geekmentors.wallpaperfreeapp D/GridFragment: Selected album id: 6044179913200717377
07-25 14:52:30.728 24105-24105/com.geekmentors.wallpaperfreeapp D/GridFragment: Final request url: https://picasaweb.google.com/data/feed/api/user/freewallpapersapp/albumid/6044179913200717377?alt=json
07-25 14:52:30.760 24105-24105/com.geekmentors.wallpaperfreeapp D/Volley: [1] DiskBasedCache.remove: Could not delete cache entry for key=https://picasaweb.google.com/data/feed/api/user/freewallpapersapp/albumid/6044179913200717377?alt=json, filename=1092955179551591262
07-25 14:52:30.778 24105-24474/com.geekmentors.wallpaperfreeapp I/WebViewFactory: Loading com.android.webview version 39 (3728910-x86) (code 300007)
07-25 14:52:30.847 24105-24474/com.geekmentors.wallpaperfreeapp I/LibraryLoader: Time to load native libraries: 2 ms (timestamps 6439-6441)
07-25 14:52:30.848 24105-24474/com.geekmentors.wallpaperfreeapp I/LibraryLoader: Expected native library version number "",actual native library version number ""
07-25 14:52:30.856 24105-24474/com.geekmentors.wallpaperfreeapp W/art: Attempt to remove local handle scope entry from IRT, ignoring
07-25 14:52:32.771 24105-24105/com.geekmentors.wallpaperfreeapp D/GridFragment: List of photos json reponse: {"version":"1.0","encoding":"UTF-8","feed":{"xmlns":"http:\/\/www.w3.org\/2005\/Atom","xmlns$openSearch":"http:\/\/a9.com\/-\/spec\/opensearchrss\/1.0\/","xmlns$gphoto":"http:\/\/schemas.google.com\/photos\/2007","xmlns$exif":"http:\/\/schemas.google.com\/photos\/exif\/2007","xmlns$media":"http:\/\/search.yahoo.com\/mrss\/","id":{"$t":"https:\/\/picasaweb.google.com\/data\/feed\/api\/user\/freewallpapersapp\/albumid\/6044179913200717377"},"updated":{"$t":"2016-12-05T21:41:40.533Z"},"category":[{"scheme":"http:\/\/schemas.google.com\/g\/2005#kind","term":"http:\/\/schemas.google.com\/photos\/2007#album"}],"title":{"$t":"Animals","type":"text"},"subtitle":{"$t":"","type":"text"},"rights":{"$t":"public","type":"text"},"icon":{"$t":"https:\/\/lh3.googleusercontent.com\/-avSkEMWdfoM\/U-E9m4zhTkE\/AAAAAAAAAgg\/IvQS28VNlNMJiOoORY9713_p4VVdHvrXACHMYCg\/s160-c\/Animals"},"link":[{"rel":"http:\/\/schemas.google.com\/g\/2005#feed","type":"application\/atom+xml","href":"https:\/\/picasaweb.google.com\/data\/feed\/api\/user\/110644481603920697983\/albumid\/6044179913200717377?alt=json"},{"rel":"alternate","type":"text\/html","href":"https:\/\/picasaweb.google.com\/110644481603920697983\/Animals"},{"rel":"http:\/\/schemas.google.com\/photos\/2007#slideshow","type":"application\/x-shockwave-flash","href":"https:\/\/photos.gstatic.com\/media\/slideshow.swf?host=picasaweb.google.com&RGB=0x000000&feed=https:\/\/picasaweb.google.com\/data\/feed\/api\/user\/110644481603920697983\/albumid\/6044179913200717377?alt%3Drss"},{"rel":"http:\/\/schemas.google.com\/photos\/2007#report","type":"text\/html","href":"https:\/\/picasaweb.google.com\/lh\/reportAbuse?uname=110644481603920697983&aid=6044179913200717377"},{"rel":"self","type":"application\/atom+xml","href":"https:\/\/picasaweb.google.com\/data\/feed\/api\/user\/110644481603920697983\/albumid\/6044179913200717377?alt=json&start-index=1&max-results=1000"}],"author":[{"name":{"$t":"Free Wallpapers"},"uri":{"$t":"https:\/\/picasaweb.google.com\/110644481603920697983"}}],"generator":{"$t":"Picasaweb","version":"1.00","uri":"http:\/\/picasaweb.google.com\/"},"openSearch$totalResults":{"$t":16},"openSearch$startIndex":{"$t":1},"openSearch$itemsPerPage":{"$t":1000},"gphoto$id":{"$t":"6044179913200717377"},"gphoto$name":{"$t":"Animals"},"gphoto$location":{"$t":""},"gphoto$access":{"$t":"public"},"gphoto$timestamp":{"$t":"1407222000000"},"gphoto$numphotos":{"$t":16},"gphoto$user":{"$t":"110644481603920697983"},"gphoto$nickname":{"$t":"Free Wallpapers"},"gphoto$allowPrints":{"$t":"true"},"gphoto$allowDownloads":{"$t":"true"},"entry":[{"id":{"$t":"https:\/\/picasaweb.google.com\/data\/entry\/api\/user\/110644481603920697983\/albumid\/6044179913200717377\/photoid\/6048145842130611714?alt=json"},"published":{"$t":"2014-08-16T12:54:49.000Z"},"updated":{"$t":"2016-08-27T10:28:29.818Z"},"category":[{"scheme":"http:\/\/schemas.google.com\/g\/2005#kind","term":"http:\/\/schemas.google.com\/photos\/2007#photo"}],"title":{"$t":"blue bird.jpg","type":"text"},"summary":{"$t":"","type":"text"},"content":{"type":"image\/jpeg","src":"https:\/\/lh3.googleusercontent.com\/-0SoPCv3Ndbs\/U-9UmVXzbgI\/AAAAAAAAAgU\/ABNWCh9YRHYzh07W_TgJTnT7MgcnR10kgCHMYBhgL\/blue%2Bbird.jpg"},"link":[{"rel":"http:\/\/schemas.google.com\/g\/2005#feed","type":"application\/atom+xml","href":"https:\/\/picasaweb.google.com\/data\/feed\/api\/user\/110644481603920697983\/albumid\/6044179913200717377\/photoid\/6048145842130611714?alt=json"},{"rel":"alternate","type":"text\/html","href":"https:\/\/picasaweb.google.com\/110644481603920697983\/Animals#6048145842130611714"},{"rel":"http:\/\/schemas.google.com\/photos\/2007#canonical","type":"text\/html","href":"https:\/\/picasaweb.google.com\/lh\/photo\/q8Cpx24XDgvOUKeB4P1GBtMTjNZETYmyPJy0liipFm0"},{"rel":"self","type":"application\/atom+xml","href":"https:\/\/picasaweb.google.com\/data\/entry\/api\/user\/110644481603920697983\/albumid\/6044179913200717377\/photoid\/6048145842130611714?alt=json"},{"rel":"http:\/\/schemas.google.com\/photo
07-25 14:52:32.772 24105-24105/com.geekmentors.wallpaperfreeapp D/GridFragment: Photo: https://lh3.googleusercontent.com/-0SoPCv3Ndbs/U-9UmVXzbgI/AAAAAAAAAgU/ABNWCh9YRHYzh07W_TgJTnT7MgcnR10kgCHMYBhgL/blue%2Bbird.jpg, w: 512, h: 456
07-25 14:52:32.772 24105-24105/com.geekmentors.wallpaperfreeapp D/GridFragment: Photo: https://lh3.googleusercontent.com/-X5dAP0vboJM/U-9UskLWBTI/AAAAAAAAAe4/OHNGZVdPcGMdaXJWf0ijSxuUnzImORENQCHMYBhgL/blue_peacock-wallpaper-2560x1600.jpg, w: 512, h: 456
07-25 14:52:32.772 24105-24105/com.geekmentors.wallpaperfreeapp D/GridFragment: Photo: https://lh3.googleusercontent.com/-yxYb0xfm7hM/U-9Up1M-JWI/AAAAAAAAAJ0/4t3uJk9O0twMEBSLfhOLv3K9JIfMYdOoQCHMYBhgL/cat_and_fish-1920x1080.jpg, w: 512, h: 449
07-25 14:52:32.772 24105-24105/com.geekmentors.wallpaperfreeapp D/GridFragment: Photo: https://lh3.googleusercontent.com/-wm9OwUsuHjU/U-9Uq4eMGOI/AAAAAAAAAJ8/LoonHsNrPYE10v7AzK6xAr6Af31dOA3ygCHMYBhgL/crazy_pug-1920x1080.jpg, w: 512, h: 454
07-25 14:52:32.772 24105-24105/com.geekmentors.wallpaperfreeapp D/GridFragment: Photo: https://lh3.googleusercontent.com/-4Wbg7REJx1o/U-9UseJ1HmI/AAAAAAAAAKI/5Kwol03W0Gsr7zxCLln-PgAZ6MV1qufYwCHMYBhgL/cute_dog_christmas-1920x1080.jpg, w: 512, h: 454
07-25 14:52:32.772 24105-24105/com.geekmentors.wallpaperfreeapp D/GridFragment: Photo: https://lh3.googleusercontent.com/-06RYVE-PcME/U-9Ut8Ka21I/AAAAAAAAAfA/w6SptuCy6wwPd6DBXM_BEBJgOwm4CDtwgCHMYBhgL/cute_kittens-2560x1600.jpg, w: 512, h: 456
07-25 14:52:32.772 24105-24105/com.geekmentors.wallpaperfreeapp D/GridFragment: Photo: https://lh3.googleusercontent.com/-fhoySfZQPp4/U-9Uxk01G7I/AAAAAAAAAKs/jxL3_8tFw0swFDxlzu2JZd52jvCZoBK6wCHMYBhgL/female_while_tiger-2560x1440.jpg, w: 512, h: 454
07-25 14:52:32.772 24105-24105/com.geekmentors.wallpaperfreeapp D/GridFragment: Photo: https://lh3.googleusercontent.com/-ZUOsCbx8ZuA/U-9UutS-NRI/AAAAAAAAAKc/T_vDNvEkdrQOZhxmbnH8vZEomYyOsgH3QCHMYBhgL/flying_hummingbird-1920x1080.jpg, w: 512, h: 455
07-25 14:52:32.773 24105-24105/com.geekmentors.wallpaperfreeapp D/GridFragment: Photo: https://lh3.googleusercontent.com/-VqpudvhEAvs/U-9Uw9k5uvI/AAAAAAAAAKk/I3ShSul1-HwIgvRYiHE7BGe0jmf1QEciACHMYBhgL/frog-1920x1080.jpg, w: 512, h: 455
07-25 14:52:32.773 24105-24105/com.geekmentors.wallpaperfreeapp D/GridFragment: Photo: https://lh3.googleusercontent.com/-ZGxRghNz0Sc/U-9U08qPRVI/AAAAAAAAAgY/Z3Iixaknu-ErOjcCnIoNhjc7afuRYZTMACHMYBhgL/jaguar-2560x1600.jpg, w: 512, h: 456
07-25 14:52:32.773 24105-24105/com.geekmentors.wallpaperfreeapp D/GridFragment: Photo: https://lh3.googleusercontent.com/-hOvucB5jxgw/U-9U1hUx82I/AAAAAAAAALE/8P54XwiqkgsX-pck3zX7UUAHx12K8gebACHMYBhgL/lion.jpg, w: 512, h: 411
07-25 14:52:32.773 24105-24105/com.geekmentors.wallpaperfreeapp D/GridFragment: Photo: https://lh3.googleusercontent.com/-XXUBHVZkd2M/U_MH39a2hFI/AAAAAAAAAbs/Y_YOlNpH3VceiDsBeDZd7d9L0n49vqEowCHMYBhgL/animal_4-wallpaper-2048x1152.jpg, w: 512, h: 454
07-25 14:52:32.773 24105-24105/com.geekmentors.wallpaperfreeapp D/GridFragment: Photo: https://lh3.googleusercontent.com/-NxvlrSzU_mE/U-9U2qwtxNI/AAAAAAAAALM/wMP5nBn2Lg8ToNw8KDV-D32F19OBhk-5gCHMYBhgL/sparrows.jpg, w: 512, h: 453
07-25 14:52:32.773 24105-24105/com.geekmentors.wallpaperfreeapp D/GridFragment: Photo: https://lh3.googleusercontent.com/-CRHu4Y87UIw/U_MH2zpCJLI/AAAAAAAAAgc/c_dTE4cEbfkL5boNylTizHjMiuo0z6ZkgCHMYBhgL/red%2Bparrot.jpg, w: 512, h: 456
07-25 14:52:32.773 24105-24105/com.geekmentors.wallpaperfreeapp D/GridFragment: Photo: https://lh3.googleusercontent.com/-54QsKl1sylA/U-9U4wzclHI/AAAAAAAAAgg/1ND1L5qkBCcDUb1QNu5oIR9GcbRXh1GdwCHMYBhgL/the%2Bdragon.jpg, w: 512, h: 456
07-25 14:52:32.773 24105-24105/com.geekmentors.wallpaperfreeapp D/GridFragment: Photo: https://lh3.googleusercontent.com/-_UDIoq46zOM/U-9U4Wzd56I/AAAAAAAAALY/d5ZHRGv1r0c3wHKJ8Ypwu3FkdRT6VAWvACHMYBhgL/water_bird-wallpaper-1920x1080.jpg, w: 512, h: 454
07-25 14:52:32.879 24105-24120/com.geekmentors.wallpaperfreeapp I/art: Background partial concurrent mark sweep GC freed 2647(220KB) AllocSpace objects, 0(0B) LOS objects, 3% free, 116MB/120MB, paused 8.864ms total 51.595ms
07-25 14:52:35.183 24105-24105/com.geekmentors.wallpaperfreeapp V/WebViewChromiumFactoryProvider: Binding Chromium to main looper Looper (main, tid 1) {2f2c899}
07-25 14:52:35.184 24105-24105/com.geekmentors.wallpaperfreeapp I/LibraryLoader: Expected native library version number "",actual native library version number ""
07-25 14:52:35.184 24105-24105/com.geekmentors.wallpaperfreeapp I/chromium: [INFO:library_loader_hooks.cc(104)] Chromium logging enabled: level = 0, default verbosity = 0
07-25 14:52:35.193 24105-24105/com.geekmentors.wallpaperfreeapp I/BrowserStartupController: Initializing chromium process, singleProcess=true
07-25 14:52:35.194 24105-24105/com.geekmentors.wallpaperfreeapp W/art: Attempt to remove local handle scope entry from IRT, ignoring
07-25 14:52:35.209 24105-24105/com.geekmentors.wallpaperfreeapp W/chromium: [WARNING:resource_bundle.cc(304)] locale_file_path.empty()
07-25 14:52:35.210 24105-24105/com.geekmentors.wallpaperfreeapp I/chromium: [INFO:aw_browser_main_parts.cc(65)] Load from apk succesful, fd=50 off=46184 len=3037
07-25 14:52:35.210 24105-24105/com.geekmentors.wallpaperfreeapp I/chromium: [INFO:aw_browser_main_parts.cc(78)] Loading webviewchromium.pak from, fd:51 off:229484 len:1089587
07-25 14:52:35.212 24105-24590/com.geekmentors.wallpaperfreeapp W/AudioManagerAndroid: Requires BLUETOOTH permission
07-25 14:52:35.304 24105-24105/com.geekmentors.wallpaperfreeapp W/chromium: [WARNING:data_reduction_proxy_settings.cc(331)] SPDY proxy OFF at startup
07-25 14:52:35.330 24105-24105/com.geekmentors.wallpaperfreeapp W/art: 

我的Log Cat

 07-25 14:37:34.022 11406-11406/? W/Zygote: createProcessGroup failed, kernel missing CONFIG_CGROUP_CPUACCT?
    07-25 14:37:34.022 11406-11406/? I/art: Not late-enabling -Xcheck:jni (already on)
    07-25 14:37:34.207 11406-11421/com.geekmentors.wallpaperfreeapp I/art: Background partial concurrent mark sweep GC freed 91(16KB) AllocSpace objects, 0(0B) LOS objects, 3% free, 97MB/101MB, paused 8.388ms total 24.601ms
    07-25 14:37:34.354 11406-11406/com.geekmentors.wallpaperfreeapp D/SplashActivity: Albums request url: https://picasaweb.google.com/data/feed/api/user/fbphotocomments?kind=album&alt=json
    07-25 14:37:34.384 11406-11444/com.geekmentors.wallpaperfreeapp D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true

                                                                                      [ 07-25 14:37:34.388 11406:11406 D/         ]
                                                                                      HostConnection::get() New Host Connection established 0xb42f45e0, tid 11406
    07-25 14:37:34.391 11406-11406/com.geekmentors.wallpaperfreeapp D/Atlas: Validating map...
    07-25 14:37:34.456 11406-11444/com.geekmentors.wallpaperfreeapp I/OpenGLRenderer: Initialized EGL, version 1.4
    07-25 14:37:34.458 11406-11444/com.geekmentors.wallpaperfreeapp W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
    07-25 14:37:34.523 11406-11444/com.geekmentors.wallpaperfreeapp D/OpenGLRenderer: Enabling debug mode 0
    07-25 14:37:47.399 11406-11406/com.geekmentors.wallpaperfreeapp D/SplashActivity: Albums Response: {"version":"1.0","encoding":"UTF-8","feed":{"xmlns":"http:\/\/www.w3.org\/2005\/Atom","xmlns$openSearch":"http:\/\/a9.com\/-\/spec\/opensearchrss\/1.0\/","xmlns$gphoto":"http:\/\/schemas.google.com\/photos\/2007","id":{"$t":"https:\/\/picasaweb.google.com\/data\/feed\/api\/user\/fbphotocomments"},"updated":{"$t":"2017-07-25T08:50:53.838Z"},"category":[{"scheme":"http:\/\/schemas.google.com\/g\/2005#kind","term":"http:\/\/schemas.google.com\/photos\/2007#user"}],"title":{"$t":"116045590048702867046","type":"text"},"subtitle":{"$t":"","type":"text"},"icon":{"$t":"https:\/\/lh3.googleusercontent.com\/-mvQT1Sqyq2g\/AAAAAAAAAAI\/AAAAAAAAAAA\/FSXky0-WEQM\/s64-c\/116045590048702867046.jpg"},"link":[{"rel":"http:\/\/schemas.google.com\/g\/2005#feed","type":"application\/atom+xml","href":"https:\/\/picasaweb.google.com\/data\/feed\/api\/user\/116045590048702867046?alt=json"},{"rel":"alternate","type":"text\/html","href":"https:\/\/picasaweb.google.com\/116045590048702867046"},{"rel":"http:\/\/schemas.google.com\/photos\/2007#slideshow","type":"application\/x-shockwave-flash","href":"https:\/\/photos.gstatic.com\/media\/slideshow.swf?host=picasaweb.google.com&RGB=0x000000&feed=https:\/\/picasaweb.google.com\/data\/feed\/api\/user\/116045590048702867046?alt%3Drss"},{"rel":"self","type":"application\/atom+xml","href":"https:\/\/picasaweb.google.com\/data\/feed\/api\/user\/116045590048702867046?alt=json&start-index=1&max-results=1000&kind=album"}],"author":[{"name":{"$t":"Digital India"},"uri":{"$t":"https:\/\/picasaweb.google.com\/116045590048702867046"}}],"generator":{"$t":"Picasaweb","version":"1.00","uri":"http:\/\/picasaweb.google.com\/"},"openSearch$totalResults":{"$t":0},"openSearch$startIndex":{"$t":1},"openSearch$itemsPerPage":{"$t":1000},"gphoto$user":{"$t":"116045590048702867046"},"gphoto$nickname":{"$t":"Digital India"},"gphoto$thumbnail":{"$t":"https:\/\/lh3.googleusercontent.com\/-mvQT1Sqyq2g\/AAAAAAAAAAI\/AAAAAAAAAAA\/FSXky0-WEQM\/s64-c\/116045590048702867046.jpg"}}}
    07-25 14:37:47.399 11406-11406/com.geekmentors.wallpaperfreeapp W/System.err: org.json.JSONException: No value for entry
    07-25 14:37:47.400 11406-11406/com.geekmentors.wallpaperfreeapp W/System.err:     at org.json.JSONObject.get(JSONObject.java:389)
    07-25 14:37:47.400 11406-11406/com.geekmentors.wallpaperfreeapp W/System.err:     at org.json.JSONObject.getJSONArray(JSONObject.java:584)
    07-25 14:37:47.400 11406-11406/com.geekmentors.wallpaperfreeapp W/System.err:     at com.geekmentors.wallpaperfreeapp.SplashActivity$1.onResponse(SplashActivity.java:56)
    07-25 14:37:47.400 11406-11406/com.geekmentors.wallpaperfreeapp W/System.err:     at com.geekmentors.wallpaperfreeapp.SplashActivity$1.onResponse(SplashActivity.java:47)
    07-25 14:37:47.400 11406-11406/com.geekmentors.wallpaperfreeapp W/System.err:     at com.android.volley.toolbox.JsonRequest.deliverResponse(JsonRequest.java:72)
    07-25 14:37:47.400 11406-11406/com.geekmentors.wallpaperfreeapp W/System.err:     at com.android.volley.ExecutorDelivery$ResponseDeliveryRunnable.run(ExecutorDelivery.java:99)
    07-25 14:37:47.400 11406-11406/com.geekmentors.wallpaperfreeapp W/System.err:     at android.os.Handler.handleCallback(Handler.java:739)
    07-25 14:37:47.400 11406-11406/com.geekmentors.wallpaperfreeapp W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:95)
    07-25 14:37:47.400 11406-11406/com.geekmentors.wallpaperfreeapp W/System.err:     at android.os.Looper.loop(Looper.java:135)
    07-25 14:37:47.400 11406-11406/com.geekmentors.wallpaperfreeapp W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:5254)
    07-25 14:37:47.400 11406-11406/com.geekmentors.wallpaperfreeapp W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
    07-25 14:37:47.400 11406-11406/com.geekmentors.wallpaperfreeapp W/System.err:     at java.lang.reflect.Method.invoke(Method.java:372)
    07-25 14:37:47.401 11406-11406/com.geekmentors.wallpaperfreeapp W/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
    07-25 14:37:47.401 11406-11406/com.geekmentors.wallpaperfreeapp W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
    07-25 14:37:47.588 11406-11444/com.geekmentors.wallpaperfreeapp V/RenderScript: 0xb419f000 Launching thread(s), CPUs 4

2 个答案:

答案 0 :(得分:0)

错误是由No value for entry引起的,当您要求读取名为entry的实体时,它在JSON响应中不存在。并使用jsonObject.has("entry");

测试它是否存在

答案 1 :(得分:0)

调试后我得到了同样的错误。我找到了解决方案。

Feed数组中没有条目JSON数组。执行以下步骤:

  1. 从Feed数组中获取ID数组。
  2. 在Id数组中,您会在链接中找到一个链接,然后您会得到一个响应,您将找到条目数组。
  3. 然后保持不变。检查下图:
  4. enter image description here