相关疑难解决方法(0)

如何在Android Studio中获取SHA-1指纹证书以获得调试模式?

我已将自己从Eclipse转移到Android Studio.现在我正在尝试使用我的地图应用程序.所以我需要我的SHA-1指纹证书号码.

当我使用Eclipse时,它正好在Windows - > Preferences - > Android - > Build下.但是在Android Studio中,我找不到这样的选项,以便我可以轻松找到指纹.我正在使用Windows.我从这个链接中读到:

当您从IDE运行或调试项目时,Android Studio会自动以调试模式签署您的应用程序.

所以我尝试在从此链接设置我的Java bin路径后在命令行中运行它,但遗憾的是找不到我的指纹.据说这是非法的选择.

keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
Run Code Online (Sandbox Code Playgroud)

有没有办法从Android Studio中找到SHA-1指纹,就像在Eclipse中一样容易?由于我是Android Studio中的新手,找到它的完整过程是什么?

我想要添加的另一件事是我让我的Eclipse生成SHA-1指纹,之前我在Google开发者控制台中将该应用程序注册在该指纹上,并且我通过该API密钥在Eclipse中使用该应用程序.在Android Studio中我的项目是否可以使用相同的API密钥?

google-maps android-studio

454
推荐指数
34
解决办法
50万
查看次数

发布后Google Places API崩溃

我一直在尝试将Google Places API集成到我的应用程序中,但似乎无法启动API.每次单击按钮启动API时,它都会加载,然后恢复到主屏幕.我相信我已经遵循了API文档中的所有步骤,但似乎似乎无法找到问题.我的代码如下:

Java类:

package lgalle19.developements.findplaces;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.text.Html;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.google.android.gms.common.GooglePlayServicesNotAvailableException;
import com.google.android.gms.common.GooglePlayServicesRepairableException;
import com.google.android.gms.location.places.Place;
import com.google.android.gms.location.places.ui.PlacePicker;


public class PlacePickerActivity extends ActionBarActivity {
private static final int PLACE_PICKER_REQUEST = 1;
private TextView mViewName;
private TextView mViewAddress;
private TextView mViewAttributions;
private Button mPickerButton;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_place_picker);

    mViewName = (TextView) findViewById(R.id.textView);
    mViewAddress = (TextView) findViewById(R.id.textView2);
    mViewAttributions = (TextView) findViewById(R.id.textView3);
    mPickerButton = (Button) findViewById(R.id.pickerButton);
} …
Run Code Online (Sandbox Code Playgroud)

java api android google-places-api google-places

6
推荐指数
1
解决办法
1710
查看次数