Last active
August 29, 2015 14:05
-
-
Save xxnjdlys/a1ebb645733183af50c9 to your computer and use it in GitHub Desktop.
Welcome document
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Migrating Project To Android Studio Beta | |
=============================================== | |
#### 为了部落 && 感受暴风城的力量 ... | |
It takes me lots of time to solve this problem and I hope this post will save your time. | |
Are you stuck trying to build your android project using Android Studio with Android L preview? | |
##### Here is my experience. | |
* First I downloaded the latest build of Android Studio Beta. | |
* Next, I would import my current project from Eclipse using all default settings which was impressive. | |
* However, once I tried to build I would experience issues such as: | |
>"Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed : uses-sdk:minSdkVersion 9 cannot be smaller than version L declared in library com.android.support:support-v4:21.0.0-rc1" | |
##### Here is how I solve the issue which allowed me to build and run on multiple platforms (i.e. v19,v18,v17). | |
* Make sure to download the proper SDK's using your SDK manager located in the top toolbar within Android Studio. | |
* Open AndroidManifest, add the following (replace "MyApp") | |
<pre><code> | |
《 manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
package="com.MyApp" | |
android:versionCode="1" | |
android:versionName="1.0" > | |
<uses-sdk tools:node="replace" /> | |
</code></pre> | |
* Open build.gradle, add the following (replace "MyApp"): | |
<pre><code> | |
android { | |
compileSdkVersion 20 | |
buildToolsVersion '20.0.0' | |
defaultConfig { | |
applicationId 'com.MyApp' | |
minSdkVersion 9 | |
targetSdkVersion 20 | |
versionCode 1 | |
versionName '1.0' | |
} | |
</code></pre> | |
* Within build.gradle add the following dependancies: | |
<pre><code> | |
dependencies { | |
compile('com.android.support:support-v4:20.0.0') { | |
force = true | |
} | |
compile ('com.android.support:cardview-v7:20.0.0'){ | |
force = true | |
} | |
compile 'com.android.support:recyclerview-v7:+' | |
compile 'com.android.support:palette-v7:+' | |
} | |
</code></pre> | |
* Test and compile, Good luck and enjoy it :) | |
##### Here is another post about build.gradle file [Migrating Project to Android Studio Beta](https://gist.github.com/SadieYuCN/11b83f4baf55448ccf41) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment