高德API相关
学习gradle,http://blog.csdn.net/innost/article/details/48228651
Android 的编译框架
1. android studio中运行的app都是用C:\Users\ouyl\.android\debug.keystore文件,产生的SHA1都是一样的,只是包不一样,不同包在高德key里面改就行了。
2.对于要发布的app,应该用选择Build > Generate Signed APK…产生自己的jks文件,如 http://www.open-open.com/lib/view/open1441896025274.html 所示,
再用keytool -v -list -keystore realse.jsk 获取SHA1,把SHA1和包设置到高德的key中去就行了。
把产生的realse apk存到手机中运行(不能在android studio里运行安装)。
- SHA1 fingerprint
来自 <http://lbs.amap.com/console/key/terms/android>
高德地图开发申请KEY的时候需要开发者提供SHA1证书指纹数据,在eclipse很容易就找到了,但是Android Studio很久也没找到,只能使用在网上看到的方法了,在Android Studio中的Terminal中使用keytool获取了,具体如下图所示(输入密钥库口令--测试的默认口令为:android,如果使用自己提供的keystore,就是自己的密码了):
C:\Users\ouyl\.android>keytool -list -v -keystore debug.keystore
Keytool 是jdk自带命令,要设置路径
android studio Terminal 命令字符不能输入,请求帮助
找到原因了,前几天无意找到的,
是因为升级系统的原因,不知道你找到没,打开windows的cmd窗口 选择属性 选择使用旧版本控制台就OK了。
------------------------------------------------------------------------------------------
ECLIPSE ANDROID PROJECT IMPORT SUMMARY
======================================
Ignored Files:
--------------
The following files were *not* copied into the new Gradle project; you
should evaluate whether these are still needed in your project and if
so manually move them:
* .gitignore
* AMapLocationDemo.zip
* ic_launcher-web.png
* 运行Android-Demo必看.pdf
Replaced Jars with Dependencies:
--------------------------------
The importer recognized the following .jar files as third party
libraries and replaced them with Gradle dependencies instead. This has
the advantage that more explicit version information is known, and the
libraries can be updated automatically. However, it is possible that
the .jar file in your project was of an older version than the
dependency we picked, which could render the project not compileable.
You can disable the jar replacement in the import wizard and try again:
android-support-v4.jar => com.android.support:support-v4:19.+
Moved Files:
------------
Android Gradle projects use a different directory structure than ADT
Eclipse projects. Here's how the projects were restructured:
* AndroidManifest.xml => app\src\main\AndroidManifest.xml
* libs\AMap_ Location_v1.4.0_20150830.jar => app\libs\AMap_ Location_v1.4.0_20150830.jar
* libs\Android_Map_2.5.1.20150827.jar => app\libs\Android_Map_2.5.1.20150827.jar
* libs\arm64-v8a\libamapv304.so => app\src\main\jniLibs\arm64-v8a\libamapv304.so
* libs\arm64-v8a\libamapv304ex.so => app\src\main\jniLibs\arm64-v8a\libamapv304ex.so
* libs\armeabi-v7a\libamapv304.so => app\src\main\jniLibs\armeabi-v7a\libamapv304.so
* libs\armeabi-v7a\libamapv304ex.so => app\src\main\jniLibs\armeabi-v7a\libamapv304ex.so
* libs\armeabi\libamapv304.so => app\src\main\jniLibs\armeabi\libamapv304.so
* libs\armeabi\libamapv304ex.so => app\src\main\jniLibs\armeabi\libamapv304ex.so
* libs\x86\libamapv304.so => app\src\main\jniLibs\x86\libamapv304.so
* libs\x86\libamapv304ex.so => app\src\main\jniLibs\x86\libamapv304ex.so
* proguard-project.txt => app\proguard-project.txt
* res\ => app\src\main\res\
* src\ => app\src\main\java\
Missing Android Support Repository:
-----------------------------------
Some useful libraries, such as the Android Support Library, are
installed from a special Maven repository, which should be installed
via the SDK manager.
It looks like this library is missing from your SDK installation at:
D:\Users\android-sdk-windows
To install it, open the SDK manager, and in the Extras category,
select "Android Support Repository". You may also want to install the
"Google Repository" if you want to use libraries like Google Play
Services.
Next Steps:
-----------
You can now build the project. The Gradle project needs network
connectivity to download dependencies.
Bugs:
-----
If for some reason your project does not build, and you determine that
it is due to a bug or limitation of the Eclipse to Gradle importer,
please file a bug at http://b.android.com with category
Component-Tools.
(This import summary is for your information only, and can be deleted
after import once you are satisfied with the results.)