fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
03/14/15 04:44 AM (9 years ago)

Newbie questions about Android Studio

Hi gang, I have two outrageously stupid questions about Android... Eclipse is a nightmare for me code-dumb iOS aficionado. Never could do anything. Will Android Studio be easier? Well... not really. Installation on OS X: OK Importing package: OK Running app: yikes! I don't have an Android device yet, so I tried the emulator. Many trials and errors Finally, Nexus S Android 4.0 doesn't generate errors. But... All I get is a white screen looking like a menu, with a single row featuring an arrow, the icon of my app, and the name HomeScreen. Nothing more. Clicking doesn't do anything. So... two stupid questions: 1. What am I doing wrong? 2. If I decide to buy a very cheap Android device, will it be OK for testing? I've found 2 models available in my country for less than 100 bucks: HUAWEI Ascend Y330 with Android 4.2 Jelly Bean and WIKO Sunset with Android 4.4 Kitkat. Please keep in mind that I've never had an Android device in my hands and pardon my dumbness ;-) Thanks in advance for any tips! Cheers Jack
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
03/14/15 05:27 AM (9 years ago)
Hi @fusionch, There are no stupid or dumb questions. I would try a few things. Try a clean and refresh on your project in the studio. If that does not work then go to the bt control panel and copy your config file and paste it in your project config file. I would go with the 4.4. LA
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
03/14/15 07:03 AM (9 years ago)
I used the nexus s simulator for my midterm exam and it took literally 10 minutes to load up.I have used a hauwei phone in the past to run bt apps in studio and eclipse, although it was a pretty slow device compared to my galaxy.as long as it's 4.0 and up it should work
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
03/14/15 09:32 AM (9 years ago)
Thanks guys... My problem was elsewhere... Anyway LA's advice was good, even if I had already cleaned and refreshed, and copy-pasted config... Xcode basics too ;-) CMCoffee's advice was good too, I tried another emulator and everything's ok... But now I have to dive deep into study, as it's really a different universe! I will sure have more problems and questions later :-) Cheers Jack
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
03/14/15 08:53 PM (9 years ago)
Don't forget to spend time looking at LogCat...there is valuable info in there that will tell you exactly what's happening in an RUNNING app. Here's a video showing how it works: https://www.youtube.com/watch?v=ayIR5a51Ohg Mark
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
03/15/15 04:13 AM (9 years ago)
Thanks, Mark, I guess I'll need all your tutorials :-) Cheers Jack
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
03/15/15 05:21 AM (9 years ago)
You can never go wrong with Mark's tutorials! Also, I often uninstall the App I'm using on the emulator when I get a white screen like you did. Learn how to uninstall Apps on the emulator and you can get more storage and and it makes the emulator run faster. LA
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
03/15/15 09:16 AM (9 years ago)
Thanks for the tip! Quitting emulator and studio, relaunching and cleaning is not enough? By the way... All my apps use tabs... Is the new BT package OK for apps with tabs? I tried a tabbed layout and I only get the screen corresponding to the first tab. And when testing I don't see any reference to my tab icons in LogCat... Puzzling! Jack
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
03/15/15 09:40 AM (9 years ago)
Everything in Buzztouch is compatible with the new package. The new stuff is literally a new way of packaging everything in the order that Studio wants it...doesn't touch any code at all. Did you include your tab icons in your project? They need to be in res > drawable. And did you link other screens to your additional tabs? Mark
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
03/15/15 10:05 AM (9 years ago)
this is irrelevant sort of but Parse works flawlessly on new bt android studio package, just by following parse online instructions. No extra steps needed. Just take out one of the receivers in the manifest I couldn't get the buzztouch.com hosted apps to send push from cp tho, just parses gcm backend
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
03/15/15 10:48 AM (9 years ago)
I'm just groping... but yes, I did include the tab icons in res > drawable and I did link other screens! -- Er... what a strange universe! Guess all iOS-regulars are feeling lost at start ;-)
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
03/15/15 11:28 AM (9 years ago)
Try dragging them in the project you unzipped instead of android studio
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
03/15/15 11:33 AM (9 years ago)
I did! I've seen that Android Studio, when you quit and relaunch, "sees" any file you add, you don't have to drag the files into the software (as in Xcode).
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
03/15/15 11:40 AM (9 years ago)
Is the name of the images in all lower case letters?
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
03/15/15 11:56 AM (9 years ago)
Also, if you want to see the names of the icon in LogCat use the bt debugger class or log class.in bt_activity_host.java in setupTabs method find this code: if(iconName.length() > 0){ d = BT_fileManager.getDrawableByName(iconName); } Then add this under it: System.out.println ("icon :" + iconName); (Sorry don't remember log methods, works the same though) Edit ------- if you want to use bt method: BT_debugger.showIt(activityName + "icon: )" + iconName);
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
03/15/15 11:57 AM (9 years ago)
Sure, and with _ not - (Trial and error... Slowly discovering...) Thanks anyway!
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
03/15/15 11:58 AM (9 years ago)
(I'll try the next tip, thanks!)
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
03/15/15 01:17 PM (9 years ago)
If you've specified the names of the icon files in your control panel, then there should be some output regarding them in LogCat. And, as Chris mentions, they have to be named using the syntax of no special characters, spaces, or anything crazy like that. It's best to name them all lower case. Mark
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
03/16/15 04:46 AM (9 years ago)
I think I messed things up, so I redownloaded package, put all files in the right place with the correct syntax... Found some errors on my side, some errors in the plugins... But... still not OK with tabbed layout! I'm afraid some deprecations in the code are the reason... In BT_activity_host, there are many warnings about deprecations focused on tabs... Have a look at: //remove tabs if we're using them... if(actionBar.getNavigationMode() == ActionBar.NAVIGATION_MODE_TABS){ actionBar.removeAllTabs(); } and: //get title and icon for this tab... String title = BT_strings.getJsonPropertyValue(thisTab.getJsonObject(), "textLabel", ""); Drawable d = null; String iconName = BT_strings.getJsonPropertyValue(thisTab.getJsonObject(), "iconName", ""); if(iconName.length() > 0){ d = BT_fileManager.getDrawableByName(iconName); } Tab tmpTab = actionBar.newTab(); tmpTab.setText(title); tmpTab.setTabListener(this); tmpTab.setTag(t); if(d != null) tmpTab.setIcon(d); actionBar.addTab(tmpTab); } ... and maybe some more? Any idea? Cheers Jack
 

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.