- Create a new Android Studio project (I usually call it AndroidStudioHolder, but the name is unimportant)
- cd AndroidStudioHolder/app/src/main
- rm -rf res
- ln -s ../../../../YourAndroidProject/Resources res
Tuesday, June 21, 2016
Xamarin Studio + Android Studio
Wednesday, April 22, 2015
Xamarin Studio 5.9 + F# - Target _CreateNativeLibraryArchive failing
Target _CreateNativeLibraryArchive:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets:
error : Error executing task CreateNativeLibraryArchive: Argument cannot be
null.
Parameter name: unformatted
Build FAILED.
The bug has been reported to Xamarin - tech support found the solution.
Sunday, April 27, 2014
AndroidProguardScala 51 released - supports 2.11
The release adds support for Scala 2.11 (including the 3.x.x and 4.x.x branches of the Scala IDE).
Install instructions are here.
Saturday, August 10, 2013
v50 of AndroidProguardScala released
Changes:
- Update to latest version of dependencies (Scala 2.10.2, Scalaz 7.0.2)
- Better checking for Proguard errors
Friday, August 10, 2012
OpenSL ES for Android - SL_RESULT_CONTENT_UNSUPPORTED
E/AudioRecord( 2108): AudioFlinger could not create record track, status: -1 E/libOpenSLES( 2108): android_audioRecorder_realize(0x1cde560) error creating AudioRecord object W/libOpenSLES( 2108): Leaving Object::Realize (SL_RESULT_CONTENT_UNSUPPORTED)
look a bit higher in the log. The solution might be staring you in the face:
W/ServiceManager( 81): Permission failure: android.permission.RECORD_AUDIO from uid=10078 pid=2108 E/AudioFlinger( 81): Request requires android.permission.RECORD_AUDIO
Saturday, July 14, 2012
Scala on Android: what you need to know (some of this applies to any large Android codebase)
Summary
Android tools limit you to 65535 methods referenced, which includes both methods defined and methods called. If you hit this limit (and you will with anything past hello-world when you're using the Scala library), you need to run an external tool.Useful links
The Android bug. Important quote:
https://issues.scala-lang.org/browse/SI-5278 Scala outputs redundant interface declarations in bytecodeIt turns out that you have made the first report we've seen of anyone running into Dalvik's existing limit of 65536 method references per dex file
This is the bug + fix that should solve LinnearAlloc issues.
http://code.google.com/p/android/issues/detail?id=22586 Issue 22586: Dexopt fails with "LinearAlloc exceeded" for deep interface hierarchies
Earlier Scala versions hit this, but the problem has been solved by SI-5278.
https://issues.scala-lang.org/browse/SI-4620 Android install of scala 2.9.0 built binary fails (worked with scala 2.8.1)
Here's the Scala issue covering the Scala patch that reduced the
https://github.com/scala/scala/commit/7a99c03da1d31ac5950eecb30f422f43c5e3d04e Don't generate redundant interfaces
Here's the Scala patch itself. It includes this comment:
Drop redundant interfaces (ones which are implemented by somehttp://code.google.com/p/android/issues/detail?id=20814 dx crashes on projects with > 65,535 methods
other parent) from the immediate parents. This is important on
android because there is otherwise an interface explosion.
Note that the title is misleading (it's not just number of methods). From the bug:
As I understand it, the limit is the number of methods referenced, which includes both methods defined and methods called, which is why you might see this even if your app only contains 56,484 method definitions.http://www.scala-lang.org/node/10929
A conversation about using Scala with Android
Thursday, July 12, 2012
Getting this? E/dalvikvm( 6037): JNI ERROR (app bug): attempt to use stale weak global reference 0xb
E/dalvikvm( 6037): JNI ERROR (app bug): attempt to use stale weak global reference 0xb
Notice that this problem has nothing to do with any of your JNI code.
Thursday, July 5, 2012
New version of the Android/Scala Eclipse plugin available
Wednesday, October 26, 2011
Brief review of gadgets from Google IO 2011, five months later
At Google IO 2011, swag was received. Two things really stand out:
Samsung Galaxy Tab 10.1 This rocks. I use it constantly. It’s a great dev device, too, since it’s really fast. (That does require also using dev code on an el cheapo phone too – my choice for that are a couple Samsung Europas I bought in Ireland for E50.) The only “problem” is that I have to compete with my wife for the device. We’ve got a Fire on order that should solve that problem. (I’d buy another Galaxy, but as a developer I feel like I need lots of new devices. My wife laughs when she hears that.)
Chromebook. I can’t even be bothered to find a link to these things. I tried to use it, but it’s slow and has a nasty screen. Feels like an obsolete laptop I discarded a couple years ago. I don’t even know where it is, and I realized I can’t even tell you how long it’s been missing.
Tuesday, August 23, 2011
Mobile market in Ireland - Android and iPhone
Monday, May 16, 2011
Notes on Android Market for Developers session at Google I/O 2011
(For Google I/O Show and Tell http://www.meetup.com/seattle-gtug/events/16361982/)
- James Moore, james@restphone.comSession video is up at http://www.google.com/events/io/2011/sessions/android-market-for-developers.html
- Growth
- 400k activations/day for Android devices worldwide
- 60% of activiations are outside USA
- He emphasized Korea and Japan
- Up from 100k/day YOY
- App installs
- 8x from 2009 -> 2010
- 2011 as of today is slightly more than all of 2010
- Charts around 3:08 in video
- Apps are used by Gingerbread and Honeycomb
- New device users == heavy consumers of applications
- graph at 6:30
- Recent installs of apps (trending categories)
- Games
- Entertainment
- Tools
- Media
- Travel and local
- Transportation
- Trending Paid apps categories (8:46)
- Games
- Tools
- Personalization
- Productivity
- Entertainment
- Medical
- Comics
- Shopping
- New OS versions are most of the app downloads 10:32
- They see two versions of Android dominant over time (the two change as new releases come out)
- Today
- 25% 2.1
- 75% 2.2
- developer.android.com has lots of numbers for things like versions, screensizes
- Major vendors committed to 18 month upgrade guarantees, announced at IO2011
- Quick demos of (14:49)
- Pulse News
- Angry Birds
- Gun Brothers
- Talked about approaches to OS version dependencies
- 90% of Android devices hitting the market have OpenGS 2.0
- New market tools offer better targeting
- Devices, geography, screensize, etc
- Coming soon
- Multiple apks (23:01) in June
- One app listing
- Different screen sizes, etc
- Multiple apks
- Aggregates billing, rating, comments
- Large apks 24:23
- 4GB total
- 50 meg apk plus 2 x 2GB bundles downloaded separtelly
- One-click integration with AdMob, already launched
- Lots of new lists on Marketplace
- Trending
- Lists by market
- Better ways to show all apps from a developer
- Direct carrier billing is 50% of app sales at one (unnamed) US carrier
- In-app upgrades are working really well
These notes are up at https://docs.google.com/document/pub?id=1mWJAHkFcP_C91opc9bOKowHye3BgMwk2G-92Mia-MUA
Tuesday, May 3, 2011
Android error: java.lang.Error: packaging failure: closure resource not found
Thursday, March 24, 2011
Bookstands for holding dev devices
I’ve just had my dev devices lying on the desk, but I decided I wanted something to hold them up. Ordered a couple from Amazon.
I ordered the Insight and the Fellows. I’m using the Insight regularly. For iPhones, it’s got a nice slot in the back to slip the cable through. I’m using a Droid as my regular Android dev device, and it’s connector is on the side, so no issues there. Haven’t tried the Evo yet.
For the iPhone, it’s not quite stable with the cable plugged in, so I just wrapped a rubber band around it. Not exactly high design, but works fine.
Both of these are cheap; < $10.
I also ordered a Gorillapod, but it’s not stable enough when you’re punching stuff on the screen. I liked it enough to keep it, though, just for its intended use (camera tripod).
Tuesday, August 17, 2010
Problem with Eclipse/Android/Helios/XML editing
Problems occurred when invoking code from plug-in: "org.eclipse.jface".
java.lang.NullPointerException
at org.eclipse.wst.xml.core.internal.document.ElementImpl.getDefaultValue(ElementImpl.java:259)
at org.eclipse.wst.xml.core.internal.document.ElementImpl.getAttributeNS(ElementImpl.java:329)
at com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode.getShortDescription(Unknown Source)
at com.android.ide.eclipse.adt.internal.editors.ui.tree.UiModelTreeLabelProvider.getText(Unknown Source)
at org.eclipse.jface.viewers.WrappedViewerLabelProvider.getText(WrappedViewerLabelProvider.java:108)
at org.eclipse.jface.viewers.WrappedViewerLabelProvider.update(WrappedViewerLabelProvider.java:164)
at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:152)
at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:934)
at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:102)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:1014)
at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:481)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2141)
at org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren(AbstractTreeViewer.java:2689)
at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct(AbstractTreeViewer.java:1867)
at org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(TreeViewer.java:721)
at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1842)
at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1799)
at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1785)
at org.eclipse.jface.viewers.StructuredViewer$7.run(StructuredViewer.java:1487)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1422)
at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:403)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1383)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1485)
at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:537)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1444)
at org.eclipse.jface.viewers.ContentViewer.setContentProvider(ContentViewer.java:252)
at org.eclipse.jface.viewers.StructuredViewer.setContentProvider(StructuredViewer.java:1641)
at org.eclipse.jface.viewers.AbstractTreeViewer.setContentProvider(AbstractTreeViewer.java:2317)
at org.eclipse.jface.viewers.TreeViewer.setContentProvider(TreeViewer.java:972)
at com.android.ide.eclipse.adt.internal.editors.ui.tree.UiTreeBlock.changeRootAndDescriptors(Unknown Source)
at com.android.ide.eclipse.adt.internal.editors.ui.tree.UiTreeBlock.createTreeViewer(Unknown Source)
at com.android.ide.eclipse.adt.internal.editors.ui.tree.UiTreeBlock.createMasterPart(Unknown Source)
at org.eclipse.ui.forms.MasterDetailsBlock.createContent(MasterDetailsBlock.java:161)
at org.eclipse.ui.forms.MasterDetailsBlock.createContent(MasterDetailsBlock.java:142)
at com.android.ide.eclipse.adt.internal.editors.resources.ResourcesTreePage.createFormContent(Unknown Source)
at org.eclipse.ui.forms.editor.FormPage$1.run(FormPage.java:152)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.forms.editor.FormPage.createPartControl(FormPage.java:150)
at org.eclipse.ui.forms.editor.FormEditor.pageChange(FormEditor.java:471)
at com.android.ide.eclipse.adt.internal.editors.AndroidEditor.pageChange(Unknown Source)
at org.eclipse.ui.part.MultiPageEditorPart.setActivePage(MultiPageEditorPart.java:1067)
at org.eclipse.ui.forms.editor.FormEditor.setActivePage(FormEditor.java:603)
at com.android.ide.eclipse.adt.internal.editors.AndroidEditor.selectDefaultPage(Unknown Source)
at com.android.ide.eclipse.adt.internal.editors.AndroidEditor.addPages(Unknown Source)
at org.eclipse.ui.forms.editor.FormEditor.createPages(FormEditor.java:138)
at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:348)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2863)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768)
at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2682)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:365)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:168)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:229)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:208)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:373)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:526)
at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:845)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:843)
at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1131)
at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1235)
at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:264)
at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:258)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:298)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3776)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1367)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1390)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1187)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3622)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3277)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
Tuesday, June 29, 2010
A proguard builder for Scala + Android
http://github.com/banshee/AndroidProguardScala
It's still pretty rough, but it gets the job done.
Monday, May 24, 2010
Android carriers and phones - Sprint, TMobile, Verizon, ATT, Droid, Evo, iPhone, Nexus One
- Droid/Verizon
- HTC Evo/Sprint
- iPhone 3G/ATT
- Nexus One/TMobile (my fiancee's phone)
Droid/Verizon: works great, works everywhere, but you need a forklift to carry this thing around. The Droid is clearly an engineering prototype that someone from marketing stole from the lab. It's just not a shipping product, no way, no how.
However, since I'm a geek, carrying around the engineering prototype hasn't been that bad. When I was carrying around the Droid and the iPhone 3G, I'd almost always pull out the Droid. I'd really only pull out the iPhone for UrbanSpoon.
HTC Evo/Sprint: The new hotness. The screen is bigger than my laptop. It's fast. It's got some lame software on it called "Sense" - sometime soon I'll need to figure out how to disable it, but it's only mildly annoying so far.
Sprint has been surprisingly good - no coverage problems in urban areas so far, and very good coverage on the train between LA and San Diego (with some dropouts where geography was pretty obviously terrible - Camp Pendleton for one).
iPhone 3G/ATT: I'd like to tell you about ATT's coverage, but I almost never pull the iPhone out of my pocket. It feels archaic at this point.
Nexus One/TMobile: Very nice phone, but as far as we can tell TMobile isn't actually in the business of providing wireless connections to cell phones with any sort of reasonable coverage. Just pathetic. TMobile isn't worth considering as a provider.
Tuesday, April 27, 2010
Liking the Droid a bit more
Just have to think of it as an engineering prototype. It's not really a device you'd expect people to pay money for - it's far too clunky for that. But as a limited production device just for developers, it's fine.
I'm carrying it and my iphone around now (it's a pain), and I find that I pull out the Droid far more often. The web browsing experience is just that much better than the iPhone.
Thursday, April 22, 2010
New Droid arrived
First impression: the thing feels like a tank. Very industrial. Not at all a warm and fuzzy feeling like the Nexus One or my iPhone.
And the slideout keyboard is the definition of epic fail. Useless, probably adds quite a bit of weight and complexity to the phone. Just wrong, wrong, wrong. This phone should never have left the lab.
I suspect that I did this in the wrong order. You need to experience a Droid before you play with a Nexus One. Had I done that, I might have been more impressed.
It's good to have a Droid though, since they're apparently the most popular Android device. Good to have around for testing. But I pity the people who have to use this as their primary device.