第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

地圖活動(dòng)的意圖問題 - 如何解決?

地圖活動(dòng)的意圖問題 - 如何解決?

開心每一天1111 2022-06-04 14:51:15
我需要?jiǎng)?chuàng)建一個(gè)必須在下周通過的活動(dòng)?;顒?dòng)是用 2 個(gè)按鈕(相機(jī)和地圖)制作一個(gè)主頁(yè),這意味著我必須使用意圖功能來(lái)工作這個(gè)應(yīng)用程序。但是我有一個(gè)問題,相機(jī)按鈕可以正常工作,但我的地圖無(wú)法正常工作,這就是我在這里尋求幫助的原因。我試過地圖=(Button) findViewById(R.id.map);        map.setOnClickListener(new View.OnClickListener() {            @Override            public void onClick(View v)            { openMapsActivity();            }        });然后public void openMapsActivity() {        Intent intent = new Intent(this, MapsActivity.class);        startActivity(intent);    }
查看完整描述

1 回答

?
呼喚遠(yuǎn)方

TA貢獻(xiàn)1856條經(jīng)驗(yàn) 獲得超11個(gè)贊

像這樣更新您的清單應(yīng)用程序:


<application

    android:allowBackup="true"

    android:icon="@mipmap/ic_launcher"

    android:label="@string/app_name"

    android:roundIcon="@mipmap/ic_launcher_round"

    android:supportsRtl="true"

    android:theme="@style/AppTheme">


    <!--

         The API key for Google Maps-based APIs is defined as a string resource.

         (See the file "res/values/google_maps_api.xml").

         Note that the API key is linked to the encryption key used to sign the APK.

         You need a different API key for each encryption key, including the release key that is used to

         sign the APK for publishing.

         You can define the keys for the debug and release targets in src/debug/ and src/release/.

    -->

    <meta-data

        android:name="com.google.android.geo.API_KEY"

        android:value="@string/google_maps_key" />


    <activity

        android:name=".MainActivity"

        android:label="@string/title_activity_maps">

        <intent-filter>

            <action android:name="android.intent.action.MAIN" />


            <category android:name="android.intent.category.LAUNCHER" />

        </intent-filter>

    </activity>

   <activity

        android:name=".MapsActivity"

        android:screenOrientation="portrait" />

</application>


查看完整回答
反對(duì) 回復(fù) 2022-06-04
  • 1 回答
  • 0 關(guān)注
  • 114 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)