Skip to content

Instantly share code, notes, and snippets.

View ddewaele's full-sized avatar

Davy De Waele ddewaele

View GitHub Profile
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.android.gms</groupId>
<artifactId>google-play-services</artifactId>
<version>10</version>
<packaging>apklib</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<platform.version>4.3_r1</platform.version>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ecs</groupId>
<artifactId>com.ecs.foursquare</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>apk</packaging>
<name>com.ecs.foursquare</name>
@ddewaele
ddewaele / Android Studio Day1.md
Last active October 7, 2016 11:12
Some notes on my first day with Android Studio

##Introduction

The goal of this article was to take a look at the latest Android Studio (v0.2.5) and see where it would take me in a single day.

For me an IDE should be simple, straightforward and hassle-free. The big pain in Android development has always been the IDE and more specifically the tooling around it. Somehow the Eclipse plugins never worked well with the core Android tools and build system. Third party tools and plugins to offload dependency management to Maven were also far from ideal.

In short, it was a difficult marriage that ultimately led to choosing IntelliJ IDEA as the preferred platform for Android Development Tooling.

Unfortunately this again left developers with a 0.x product, meaning it's going to be very rough around the edges. It's a very difficult decision to make for developers. Stick with something you know but that is far from ideal, or go with something entirely new that is supposed to be better, but in reality could also take a very long time before it reaches some kind of

Screenshot :

Project overview :

Gradle file :

buildscript {
repositories {
mavenCentral()
maven {url 'http://foursquare-api-java.googlecode.com/svn/repository'}
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android'
2013-08-21 22:02:58,217 [21653450]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $WORKSPACE_FILE$ file is null 
2013-08-21 22:02:58,219 [21653452]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/encodings.xml file is null 
2013-08-21 22:02:58,220 [21653453]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/modules.xml file is null 
2013-08-21 22:02:58,222 [21653455]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/vcs.xml file is null 
2013-08-21 22:02:58,226 [21653459]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/compiler.xml file is null 
2013-08-21 22:02:58,237 [21653470]   INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/dynamic.xml file is null 

2013-08-21 22:02:58,248 [21653481] INFO - ellij.project.impl.ProjectImpl - 135 project components i

##Project structure

I think it's important to have a good understanding of what happens under the hood when working with an idea, especially one that is still under heavy development and error prone. I'll show you what Studio does when creating or importing a project.

###New Simple Android Project

###Importing existing Samples

In this section, I'm going to be taking a look at 2 popular sample apps from Google

When no API key is configured

{
   "code":400,
   "errors":[
      {
         "domain":"usageLimits",
         "message":"Bad Request",
         "reason":"keyInvalid"

}

The issue

You receive the following error while building your project.

[2013-08-26 13:21:40 - Dex Loader] Unable to execute dex: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
[2013-08-26 13:21:40 - LatifyAndroidPremium] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
[2013-08-26 13:22:33 - Dex Loader] Unable to execute dex: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
[2013-08-26 13:22:33 - LatifyAndroidPremium] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;

How to debug this ?

<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:oauth="http://www.springframework.org/schema/security/oauth2" xmlns:sec="http://www.springframework.org/schema/security"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-1.0.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd