現在、グローバル変数アクティビティを作成しようとしています。MyApplicationがアクティビティに割り当てられない
アクティビティを設定するには、以下の手順(Android global variable)に従っています。
ただし、問題は、android:nameという属性を編集しようとしたときに発生します。アプリケーション/アクティビティの名前を入力すると、アプリケーションを拡張できないというエラーメッセージが表示されます。なぜ誰かが説明できますか?
マニフェスト:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.denny.protoype2">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:name="Protoype2"
android:allowBackup="true"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".Protoype2"
android:label="@string/title_activity_global_var"
android:theme="@style/AppTheme.NoActionBar">
</activity>
</application>
そしてProtoype2活性:
package com.example.denny.protoype2;
import android.app.Application;
public class Protoype2 extends Application {
private boolean StopTrue;
public boolean getStopTrue() {
return StopTrue;
}
public void setStopTrue (boolean StopTrue) {
this.StopTrue = StopTrue;
}
}