0
私はAndroidで新品です。私はゲームを開発し、それはうまく動作します。しかし、私は私のアプリをプレイストアに公開したとき、私は開発者コンソールにいくつかのロックを見ます。私は開発者のコンソールをチェックし、私は以下のようないくつかの問題を見た。エラーの下には、私は "R.layout.activity_game_5x" はできたことを理解し、いくつかの携帯電話(S6エッジなど注5)
Caused by: android.content.res.Resources$NotFoundException:
at android.content.res.ResourcesImpl.getValue (ResourcesImpl.java:202)
at android.content.res.Resources.loadXmlResourceParser (Resources.java:2970)
at android.content.res.Resources.getLayout (Resources.java:1986)
at android.view.LayoutInflater.inflate (LayoutInflater.java:425)
at android.view.LayoutInflater.inflate (LayoutInflater.java:378)
at com.android.internal.policy.PhoneWindow.setContentView (PhoneWindow.java:454)
at android.app.Activity.setContentView (Activity.java:2548)
at mypackagename.GameActivity.onCreate (GameActivity.java:193)
at android.app.Activity.performCreate (Activity.java:6955)
at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1126)
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2927)
を与え、ここで188と200行
if (sWidth > 480 && screenInches >= 4 && screenInches <= 5) {
//
setContentView(R.layout.activity_game_4x);
} else if (screenInches >= 5 && screenInches <= 6.5) {
//
setContentView(R.layout.activity_game_5x); 193.line is here
} else if (screenInches > 6.5 && screenInches < 9) {
//
setContentView(R.layout.activity_game_7x);
} else {
//
setContentView(R.layout.activity_game);
}
の間に私のコードです見つかりません。しかし、それは私のresフォルダにあります。私を助けてください。
これは、私がアンドロイドスタジオでビルドするときに動作し、また、いくつかの携帯電話を正常に動作します。エラーはありません。しかし、私の友人はサムスンS6エッジプラスを持っています。彼は私のアプリを実行し、その後停止した。 – jancooth
に互換性の問題がある可能性があります。ビルドに必要なAndroidの最低限必要なバージョンは何ですか? – alexay68
minSdkVersion = "17"、targetSdkVersion = "23"。これらはマニフェストファイルとグラデルファイルでは同じです。 – jancooth