1.1 ADTdevelopment environment Configuration andHello Android
window| Android SDK Manager
In addition to the items that have already been selected, select the following items. Then, click theInstall Packagesbutton.
Then, API created by AVD There are some issues that need to be installed below API of the various packages. Please refer to http://stackoverflow.com/questions/24587218/ Android-util-androidruntimeexception-you-cannot-combine-swipe-dismissal-and-the.
- < P style= "Color:rgb (0,0,0); font-family: ' Calibri ', ' Sans-serif '; font-size:11pt; Font-style:normal; Font-weight:normal; margin-top:0in; Margin-bottom:0pt "> download installation ends, restart eclipse
- < P style= "Color:rgb (0,0,0); font-family: ' Calibri ', ' Sans-serif '; font-size:11pt; Font-style:normal; Font-weight:normal; margin-top:0in; Margin-bottom:0pt "> select window | Android Virtual Device Manager menu
- < P style= "Color:rgb (0,0,0); font-family: ' Calibri ', ' Sans-serif '; font-size:11pt; Font-style:normal; Font-weight:normal; margin-top:0in; Margin-bottom:0pt "> in the popup android Virtual Device (AVD) Manager button. target Be sure to select button.
- < P style= "Color:rgb (0,0,0); font-family: ' Calibri ', ' Sans-serif '; font-size:11pt; Font-style:normal; Font-weight:normal; margin-top:0in; Margin-bottom:0pt "> back to avd Manager " Span lang= "ZH-CN" style= "Font-family:simsun", select the " button. Accept the default settings in the pop-up window, then select avd The process is long, please wait patiently.
1.2 helloandroid
Run Eclipse
- < P style= "Color:rgb (0,0,0); font-family: ' Calibri ', ' Sans-serif '; font-size:11pt; Font-style:normal; Font-weight:normal; margin-top:0in; Margin-bottom:0pt ">new | Android application Project menu
- < P style= "Color:rgb (0,0,0); font-family: ' Calibri ', ' Sans-serif '; font-size:11pt; Font-style:normal; Font-weight:normal; margin-top:0in; Margin-bottom:0pt ">next
Next,
Next,
Next,
Finish
a ADT of the Bug
[2015-05-26 13:48:46-helloandroid] Found 2 versions of Android-support-v4.jar in the Dependencylist,
[2015-05-26 13:48:46-helloandroid] but not all the versions be identical (check is based on sha-1only in this time).
[2015-05-26 13:48:46-helloandroid] All versions of the libraries must is the same at this time.
[2015-05-26 13:48:46-helloandroid] Versions Found is:
[2015-05-26 13:48:46-helloandroid] Path: C:\Users\Qingxu_Li\workspace\Android\appcompat_v7\libs\android-support-v4.jar
[2015-05-26 13:48:46-helloandroid] length:758727
[2015-05-26 13:48:46-helloandroid] sha-1:efec67655f6db90757faa37201efcee2a9ec3507
[2015-05-26 13:48:46-helloandroid] Path: C:\MyTestPrograms\Android\HelloAndroid\libs\android-support-v4.jar
[2015-05-26 13:48:46-helloandroid] length:1157388
[2015-05-26 13:48:46-helloandroid] sha-1:605c447c20ca216b5556af9f215af5d4bba1b117
[2015-05-26 13:48:46-helloandroid] Jar mismatch! Fix your dependencies
Workaround:
will be C:\MyTestPrograms\Android\HelloAndroid\libs\android-support-v4.jar Delete
- < P style= "Color:rgb (0,0,0); font-family: ' Calibri ', ' Sans-serif '; font-size:11pt; Font-style:normal; Font-weight:normal; margin-top:0in; Margin-bottom:0pt "> C:\ Users\qingxu_li\workspace\android\appcompat_v7\libs\android-support-v4.jar Copy to c:\mytestprograms\android\helloandroid\libs
- < P style= "Color:rgb (0,0,0); font-family: ' Calibri ', ' Sans-serif '; font-size:11pt; Font-style:normal; Font-weight:normal; margin-top:0in; Margin-bottom:0pt ">project| Clean
Restart Eclipse . The problem should be gone.
window| Android Virtual Device Manager
Right-click helloandoid Project, then Run as| Androidapplication. Or, Run | Run as| Android application menu.
Jdk/adt Android Development Environment Building (II)