java - Android 谷歌地图显示灰色瓷砖,但只有当它从 Eclipse 导出时

标签 java android

为什么我调试代码时它工作正常,但当我导出它时,灰色方 block 显示任何想法?提前致谢

我的 xml 文件看起来像这样我没有看到任何错误并且我使用了代码(不是 xml) 之前它运行良好,我将尝试制作一个新的 keystore 。

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/linearLayout1"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

    <TabHost
        android:id="@+id/tabhost"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1" >

        <LinearLayout
            android:id="@+id/linearLayout2"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical" >

            <TabWidget
                android:id="@android:id/tabs"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" >
            </TabWidget>

            <FrameLayout
                android:id="@android:id/tabcontent"
                android:layout_width="match_parent"
                android:layout_height="match_parent" >






                <LinearLayout
                    android:id="@+id/tab1"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="vertical" >

                    <WebView
                        android:id="@+id/webView1"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent" />

                </LinearLayout>

                <LinearLayout
                    android:id="@+id/tab2"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent" >

                    <com.google.android.maps.MapView
                        android:id="@+id/mvMain"
                        android:layout_width="match_parent"
                        android:layout_height="830dp"
                        android:layout_weight="6.20"
                        android:apiKey="0e6eU8JA0MTaiN1Z-pYPpdEgK1-cu_oKcRRaPLg"
                        android:clickable="true"
                        android:enabled="true" >
                    </com.google.android.maps.MapView>

                </LinearLayout>





                <LinearLayout
                    android:id="@+id/tab3"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="vertical" >

                    <EditText
                        android:id="@+id/editText1"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:inputType="textEmailAddress" />

                    <Button
                        android:id="@+id/button1"
                        android:layout_width="234dp"
                        android:layout_height="wrap_content"
                        android:text="Set Login" />

                    <Button
                        android:id="@+id/button2"
                        android:layout_width="234dp"
                        android:layout_height="wrap_content"
                        android:text="Check Current Stats" />

                    <TextView
                        android:id="@+id/textView1"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:textAppearance="?android:attr/textAppearanceLarge" />

                    <TextView
                        android:id="@+id/textView2"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:textAppearance="?android:attr/textAppearanceLarge" android:text=""/>
                </LinearLayout>

            </FrameLayout>
        </LinearLayout>
    </TabHost>

</LinearLayout>

最佳答案

请完成此过程:

      1. Create New Certificate.
      RightClick on Project > Android Tools> Export Signed Application Package.

       2. create new keystore. 
          C:\Program Files\Java\jdk1.6.0_25\bin>keytool.exe -list -alias Fivecondition -keystore d:\Fivecondition

      3.Go to http://code.google.com/android/add-ons/google-apis/maps-api-signup.html

在此之后使用此 key 并使用相同的证书导出 apk。

关于java - Android 谷歌地图显示灰色瓷砖,但只有当它从 Eclipse 导出时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9138283/

相关文章:

java - java中是否可以定义一组线程的执行顺序

java - JooQ 中的 DuplicateKeyException

java - 字符串在阿拉伯语中显示为单独的字母

java - 最终列表或数组不会存储值

java - 如何将 appcompat-v7 与 android API 19 一起使用

java - 如何将 jar 放在 jetty 类路径的 jetty/lib 中?

java - 尝试将学生添加到数据库时出错

java - Android - Thread.sleep 和 Handler.postDelayed() 卡住动画 UI 元素

Android Library 目标编译和后续 Android 版本中的对象

android - Android找不到multidex-1.0.3.pom的资源