Discussion Forums  >  Basics, How it Works, Is it free?

Replies: 4    Views: 123

Dunne
Android Fan
Profile
Posts: 13
Reg: Nov 13, 2013
Prague
4,380
10/23/15 03:12 AM (3 years ago)

Switching to Android studio

Hello,

i am learning now to work with Android Studio and with my first app I am getting error java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()

here is logcat :
10-23 12:52:26.020 32157-32189/com.kameliaapartments W/ZZ? BT_fileManager: readTextFileFromAssets: "/BT_config.txt"
10-23 12:52:26.020 32157-32189/com.kameliaapartments W/ZZ? BT_fragment_load_config_data:loadAppConfigData loaded "BT_config.txt" from /assets folder successfully...
10-23 12:52:26.020 32157-32189/com.kameliaapartments W/ZZ? BT_application: getDataURLFromAppData
10-23 12:52:26.060 32157-32189/com.kameliaapartments W/ZZ? BT_fragment_load_config_data:loadAppConfigData "BT_config.txt" file does use a dataURL for remote updates...
10-23 12:52:26.060 32157-32189/com.kameliaapartments W/ZZ? BT_fragment_load_config_data:loadAppConfigData cachedAppConfig.txt does not exist in the cache, using the BT_config.txt file included in project...
10-23 12:52:26.070 32157-32189/com.kameliaapartments W/ZZ? BT_application: validateApplicationData
10-23 12:52:26.080 32157-32189/com.kameliaapartments W/ZZ? BT_fragment_load_config_data:loadAppConfigData application data appears to be valid JSON...
10-23 12:52:26.080 32157-32189/com.kameliaapartments W/ZZ? BT_application: parseJSONData
10-23 12:52:26.090 32157-32189/com.kameliaapartments W/ZZ? BT_application: parsing core settings...
10-23 12:52:26.090 32157-32189/com.kameliaapartments W/ZZ? BT_application: parsing themes...
10-23 12:52:26.090 32157-32189/com.kameliaapartments W/ZZ? BT_application: parsing tabs...
10-23 12:52:26.100 32157-32189/com.kameliaapartments W/ZZ? BT_application: parsing menus...
10-23 12:52:26.100 32157-32189/com.kameliaapartments W/ZZ? BT_application: parsing screens...
10-23 12:52:26.100 32157-32189/com.kameliaapartments W/ZZ? BT_application:parseJSONData done parsing application data
10-23 12:52:26.100 32157-32189/com.kameliaapartments W/ZZ? BT_fragment_load_config_data:loadAppConfigData downloading app data from: http://www.buzztouch.com/api/app/?command=getAppData&appGuid=JA1A884E11DFBE2A2BFE23B90&apiKey=BF68986977A85DD7E77B79E&apiSecret=4E0E84759FC15A928270E1F&currentMode=Design
10-23 12:52:26.100 32157-32189/com.kameliaapartments W/ZZ? BT_downloader:downloadTextData from URL: http://www.buzztouch.com/api/app/?command=getAppData&appGuid=JA1A884E11DFBE2A2BFE23B90&apiKey=BF68986977A85DD7E77B79E&apiSecret=4E0E84759FC15A928270E1F&currentMode=Design
10-23 12:52:26.280 32157-32189/com.kameliaapartments W/ZZ? BT_downloader:downloadTextData from URL EXCEPTION: java.net.UnknownHostException: Unable to resolve host "www.buzztouch.com": No address associated with hostname URL: http://www.buzztouch.com/api/app/?command=getAppData&appGuid=JA1A884E11DFBE2A2BFE23B90&apiKey=BF68986977A85DD7E77B79E&apiSecret=4E0E84759FC15A928270E1F&currentMode=Design
10-23 12:52:26.350 32157-32189/com.kameliaapartments W/ZZ? BT_fragment_load_config_data:loadAppConfigData An exception occurred (55). java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
10-23 12:52:26.580 32157-32157/com.kameliaapartments E/ViewRootImpl? sendUserActionEvent() mView == null
10-23 13:03:03.812 32157-32162/com.kameliaapartments D/dalvikvm? GC_CONCURRENT freed 608K, 15% free 8835K/10320K, paused 6ms+2ms, total 37ms
10-23 13:06:19.262 32157-32157/com.kameliaapartments E/ViewRootImpl? sendUserActionEvent() mView == null
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/25/15 01:59 AM (3 years ago)
Hi @Dunne,

Does the device you're testing on have an internet connection? It seems as though it's trying to connect to buzztouch.com to download the config file, but it can't for some reason. I can click on the link above and it works, so I know the file is there. So, I'd check the network connection on whatever you're testing with.

Mark
 
Dunne
Android Fan
Profile
Posts: 13
Reg: Nov 13, 2013
Prague
4,380
like
10/26/15 02:24 AM (3 years ago)
Hello,

exactly that basic think I forgot.

Thank you
Michaela
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/26/15 08:21 AM (3 years ago)
Glad you got it worked out!

Mark
 
Dunne
Android Fan
Profile
Posts: 13
Reg: Nov 13, 2013
Prague
4,380
like
11/04/15 02:30 AM (3 years ago)
Hello back,

I did manage compile my app in Android studio and have now signed package for publishing. Just I don't like that app don't work when is not connected to internet. I did not have this problem with app in Eclipse.
It is possible to make setting where app stay online but without internet connection will load last configuration.

Michaela
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.