Different dependencies for debug and release in gradle and Android Studio

Build Types (debug, release, or custom) can have their own dependencies. To specify a dependency specific to a build type, do the following: dependencies { debugCompile “mydebugdependency” releaseCompile “myreleasedependency” } If your java project and android project are both using gradle, you can do the above in both of their build.gradle files.

MS C++ 2010 and mspdb100.dll

try running path\to\VC\bin\vcvars32.bat from within your current shell first. This should ensure your command-line setup will match the IDE-setup. This is not a permanent fix — you need to do it every time you launch a new shell. You could probably also find some way to add everything that’s in that .bat permanently to the … Read more

Find a jar file given the class name?

Save this as findclass.sh (or whatever), put it on your path and make it executable: #!/bin/sh find “$1” -name “*.jar” -exec sh -c ‘jar -tf {}|grep -H –label {} ‘$2” \; The first parameter is the directory to search recursively and the second parameter is a regular expression (typically just a simple class name) to … Read more

Android Studio – Importing external Library/Jar

So, Steps to follow in order to import a JAR sucesfully to your project using Android Studio 0.1.1: Download the library.jar file and copy it to your /libs/ folder inside your application project. Open the build.gradle file and edit your dependencies to include the new .jar file: compile files(‘libs/android-support-v4.jar’, ‘libs/GoogleAdMobAdsSdk-6.4.1.jar’) File -> Close Project Open … Read more

Maven: Including jar not found in public repository

You can install the project yourself. Or you can use the system scope like the following: <dependency> <groupId>org.group.project</groupId> <artifactId>Project</artifactId> <version>1.0.0</version> <scope>system</scope> <systemPath>${basedir}/lib/project-1.0.0.jar</systemPath> </dependency> systemPath requires the absolute path of the project. To make it easier, if the jar file is within the repository/project, you can use ${basedir} property, which is bound to the root of … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)