Discussion Forums  >  BT.com Website, Account Questions

Replies: 18    Views: 220

Naudes
Android Fan
Profile
Posts: 10
Reg: May 18, 2013
Sydney
100
07/24/13 05:41 PM (7 years ago)

Android 4.2.2

Hi,

Not quite sure if this is the right place to post this, but here goes.
I am developing an app which I have been testing on Android 4.1 tablets and it works perfect, no problems at all.
Now our company has decided to start selling Android 4.2.2 Tablets and no matter what I do I cannot get any apps created with Buzztouch to run on them. The error message is:
"There was a problem loading the app's configuration data. See the Logcat (console) output in Eclips. (2)"
When I run an Android 4.2.2 emulator it runs perfect without any errors so the LogCat in Eclipse shows no errors. But when I load onto an actual 4.2.2 Tablet the error ocurs.

I have even tested with a blank app (only a menu with a single entry) but the same error.

Any help will be appreciated.
 
Naudes
Android Fan
Profile
Posts: 10
Reg: May 18, 2013
Sydney
100
like
07/24/13 05:44 PM (7 years ago)
I have forgotten to mention that I have compiled the APK for google API 4.2.2
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
07/24/13 06:39 PM (7 years ago)
That's strange - especially since that error message just means the JSON wasn't valid. But I know that David is getting close on his reworking of the Android source code, so hopefully that will resolve whatever issue you're having.
 
Naudes
Android Fan
Profile
Posts: 10
Reg: May 18, 2013
Sydney
100
like
07/24/13 06:43 PM (7 years ago)
I have tested configuration data, and in JSON it's valid.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
07/24/13 08:37 PM (7 years ago)
Can you be a bit more specific about the LogCat error? Does it say anything about not being able to load the file from cache?

Also...I'd caution about compiling your app for such a specific version. That means only users at that level and newer will be able to install the app. Not a problem, I guess, if you are loading it with a device. But it'll for sure limit downloads from Google Play or elsewhere. Unless you have a specific reason not to, I'd stick with the Google API 8 (or maybe 11, which is still about 95% of the market), to give it the most exposure. Just my two cents!

Mark
 
Naudes
Android Fan
Profile
Posts: 10
Reg: May 18, 2013
Sydney
100
like
07/24/13 10:06 PM (7 years ago)
The app was developed to be installed on all tablets that we sell other people will have no use for it at all and is not available for download anywhere.

The LogCat shows no errors what so ever as I said in my previous post, it runs on a simulator (android 4.2.2) without problems but does not run on a real tablet loaded with android 4.2.2
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
07/24/13 10:26 PM (7 years ago)
Can you hook up your tablet to Eclipse and get the LogCat output? I'll bet that you see a nullPointer exception, and that it can't load from cache. Not sure what the solution is, but I've seen it a few times lately.

Mark
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
07/25/13 05:42 AM (7 years ago)
Yep - having that LogCat output for the crashing device is really important. Just educated guessing without if.
 
Naudes
Android Fan
Profile
Posts: 10
Reg: May 18, 2013
Sydney
100
like
07/25/13 07:12 PM (7 years ago)
Hi,

I have the Tablet now connected to Eclipse and here is the LogCat

07-26 12:08:08.990: I/SurfaceFlinger(1091): GraphicBufferAlloc::createGraphicBuffer
07-26 12:08:09.080: D/audio_hw_primary(1094): start_output_stream: card:0, port:0, rate:44100
07-26 12:08:09.080: V/alsa_pcm(1094): pcm_open_req, playback card: 0, device: 0, req_rate: 44100
07-26 12:08:09.080: V/alsa_pcm(1094): pcm_open_req try rate: 44100
07-26 12:08:09.080: V/alsa_pcm(1094): pcm_open_req OK config->rate: 44100
07-26 12:08:09.100: I/ActivityManager(2025): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.vglobalx/.BT_activity_root bnds=[616,193][718,295]} from pid 3368
07-26 12:08:09.220: D/dalvikvm(2025): GC_FOR_ALLOC freed 285K, 23% free 10016K/12968K, paused 67ms, total 68ms
07-26 12:08:09.270: I/SurfaceFlinger(1091): GraphicBufferAlloc::createGraphicBuffer
07-26 12:08:09.290: W/ZZ(19300): BT_activity_root:onCreate
07-26 12:08:09.330: V/PhoneStatusBar(3129): setLightsOn(true)
07-26 12:08:09.340: W/ZZ(19300): BT_activity_root:loadAppData
07-26 12:08:09.410: W/ZZ(19300): BT_device:updateDeviceConnectionType: ConnectionType: NONE
07-26 12:08:09.420: W/ZZ(19300): BT_device:updateDeviceSize This device has a screen size of: 717 (width) x 1024 (height).
07-26 12:08:09.420: W/ZZ(19300): BT_device:updateDeviceSize This application considers this to be a "large device"
07-26 12:08:09.420: W/ZZ(19300): BT_device:updateDeviceSize This device is in "landscape" orientation.
07-26 12:08:09.420: W/ZZ(19300): BT_activity_root:loadAppData loading BT_config.txt from /assests folder in Eclipse project...
07-26 12:08:09.490: I/SurfaceFlinger(1091): GraphicBufferAlloc::createGraphicBuffer
07-26 12:08:09.580: I/SurfaceFlinger(1091): GraphicBufferAlloc::createGraphicBuffer
07-26 12:08:09.670: I/ActivityManager(2025): Displayed com.vglobalx/.BT_activity_root: +417ms
07-26 12:08:09.710: I/SurfaceFlinger(1091): GraphicBufferAlloc::createGraphicBuffer
07-26 12:08:09.770: W/ZZ(19300): BT_fileManager: readTextFileFromAssets: "/BT_config.txt"
07-26 12:08:09.790: W/ZZ(19300): BT_activity_root:loadAppData loaded BT_config.txt from /assets folder successfully...
07-26 12:08:09.790: W/ZZ(19300): BT_application: getDataURLFromAppData
07-26 12:08:09.820: I/SurfaceFlinger(1091): GraphicBufferAlloc::createGraphicBuffer
07-26 12:08:09.850: I/SurfaceFlinger(1091): GraphicBufferAlloc::createGraphicBuffer
07-26 12:08:09.860: W/ZZ(19300): BT_activity_root:loadAppData BT_config.txt file does use a dataURL for remote updates...
07-26 12:08:09.860: W/ZZ(19300): BT_activity_root:loadAppData cachedAppConfig.txt does not exist in the cache...
07-26 12:08:09.860: W/ZZ(19300): BT_application: validateApplicationData
07-26 12:08:09.870: W/ZZ(19300): BT_activity_root: application data appears to be valid JSON...
07-26 12:08:09.870: W/ZZ(19300): BT_application: parseJSONData
07-26 12:08:09.890: W/ZZ(19300): BT_application: parsing core settings...
07-26 12:08:09.890: W/ZZ(19300): BT_application: parsing themes...
07-26 12:08:09.890: W/ZZ(19300): BT_application: parsing tabs...
07-26 12:08:09.890: W/ZZ(19300): BT_application: parsing screens...
07-26 12:08:09.890: W/ZZ(19300): BT_application:parseJSONData done parsing application data
07-26 12:08:09.890: W/ZZ(19300): BT_activity_root:loadAppData An exception occurred (55). java.lang.NullPointerException: replacement == null
07-26 12:08:09.900: I/SurfaceFlinger(1091): GraphicBufferAlloc::createGraphicBuffer
07-26 12:08:10.010: I/SurfaceFlinger(1091): GraphicBufferAlloc::createGraphicBuffer
07-26 12:08:11.170: I/SurfaceFlinger(1091): GraphicBufferAlloc::createGraphicBuffer
07-26 12:08:11.200: I/SurfaceFlinger(1091): GraphicBufferAlloc::createGraphicBuffer
07-26 12:08:11.210: I/SurfaceFlinger(1091): GraphicBufferAlloc::createGraphicBuffer
: E/(): Device disconnected
 
Naudes
Android Fan
Profile
Posts: 10
Reg: May 18, 2013
Sydney
100
like
07/26/13 01:23 AM (7 years ago)
Hi,

I have managed to get this fixed, it was a permissions issue with Android 4.2.2 in the manifest.xml file.
Buzz wanted to access recources on the tablet that android 4.2.2 did not want to allow.

My job is saved!!!!!!!
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
07/26/13 01:47 AM (7 years ago)
Sweet! For reference, what permission did you change?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
07/26/13 03:26 AM (7 years ago)
I was just about to jump in too! LOL.

I was going to say that if you're compiling the Android package using API 4.2.2 you'll likely see all sorts of warnings, errors, issues. It was not designed to run on this API level. Like @Chris1 mentioned, we're close to releasing the latest package.

I'm not sure what you would see but that was my first thought. It's not going to be related to JSON or the config data, it'll be related to how the parser works. Like you found, a permission level could do this.

Like @GoNorthWest mentioned, it would be helpful to learn what you "changed" in the manifest to allow this to work.
 
Naudes
Android Fan
Profile
Posts: 10
Reg: May 18, 2013
Sydney
100
like
07/26/13 07:01 PM (7 years ago)
Hi,

For reference:

I have removed permissions and only left these
<!-- required device permissions -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

BUT it was trial and error, I kept on removing the one's which I thought was causing the "Permission Denied" until it ran on the Tablet.
So, there is a very good chance that i removed some which was not necessary to be removed. I will be adding them back and see exactly which one is the main cause.

How I pinned it down was the error message "There was a problem loading the app's configuration data. See the Logcat (console) output in Eclips. (2)" I read through the code and realised that it is a generic error and does not refer to any error in particular but refers to any arror.

In BT_activity_root I found this;
"//we must have config data...
if(configData.length() < 1){

showAlert(getString(R.string.errorTitle), getString(R.string.errorConfigData) + "(3)");
BT_debugger.showIt(activityName + ":transitionToAppHomeScreen ERROR config data not valid?");

}else"

That made clear that "if(configData.length() < 1" meaning.. if configDate content < 1 (0) then show Error message.

But the config data did not = 0 so It was invoked by an Android Denial and the only thing I could think about was PERMISSIONS.

This is the best way I can explain it, SORRY! LOL
 
Niraj Shah
buzztouch Evangelist
Profile
Posts: 2942
Reg: Jul 11, 2012
Cerritos
37,920
like
07/30/13 08:53 PM (7 years ago)
Good detective work!

-- Niraj
 
cpmilez
Aspiring developer
Profile
Posts: 63
Reg: Jan 03, 2012
Ipswich, UK
6,030
like
12/18/13 10:05 AM (7 years ago)
Just came across this thread after suffering the same problem.

Good work on finding that. To update anyone else that comes across this the 1 permission I found to be the issue was.

<uses-permission android:name="android.permission.READ_PHONE_STATE" />
 
Stacey5150
Lost but trying
Profile
Posts: 54
Reg: Feb 17, 2013
West Middlesex,...
8,490
like
12/18/13 06:46 PM (7 years ago)
Thanks cpmilez!
 
HelperDev
Lost but trying
Profile
Posts: 49
Reg: Nov 16, 2012
New York
3,090
like
12/20/13 08:53 AM (7 years ago)
That permission is already in my manifest file and I'm still getting this error for all the apps I try to create.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
12/20/13 08:56 AM (7 years ago)
@HelperDev - Are you using the 3.0 package or the old one? Try the new one if you're not using it. Also, are you experiencing this on the emulator and physical device(s), or just one?
 
cpmilez
Aspiring developer
Profile
Posts: 63
Reg: Jan 03, 2012
Ipswich, UK
6,030
like
12/20/13 09:08 AM (7 years ago)
For me the problem was not happening on a device but happening when I tried to run any app in the Genymotion emulator.

I could only get it to run in this emulator by COMMENTING out the READ_PHONE_STATE permission. However you may not be suffering from the same issue as I had.
 

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.