Skip to content

Commit

Permalink
Android: target SDK 28, remove absolute path (#10568)
Browse files Browse the repository at this point in the history
Android version: an absolute path was replaced with a call to the Environment class. The target SDK of 29 was decremented to a target SDK of 28 to fix an incompatibility with an SDK change. Game now builds; however a desktop version must be built first so that build artifacts are present in /bin.
  • Loading branch information
NuclearFej authored and IntelOrca committed Jan 13, 2020
1 parent 77d18a6 commit 0192b25
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/openrct2-android/app/build.gradle
Expand Up @@ -7,7 +7,7 @@ android {
defaultConfig {
applicationId 'io.openrct2'
minSdkVersion 19
targetSdkVersion 29
targetSdkVersion 28

versionCode 2
versionName '0.2.5'
Expand Down
Expand Up @@ -11,6 +11,8 @@
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.appcompat.app.AppCompatActivity;

import android.os.Environment;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.util.Log;
Expand Down Expand Up @@ -159,7 +161,9 @@ private void startGame() {
// When building, ensure OpenRCT2 assets are inside their own directory within the APK assets,
// so that we do not attempt to copy files out of the standard Android asset folders - webkit, etc.
private void copyAssets() {
File dataDir = new File("/sdcard/openrct2/");
File dataDir = new File(Environment.getExternalStorageDirectory().toString()
+ File.separator + "openrct2" + File.separator);

try {
copyAsset(getAssets(), "openrct2", dataDir, "");
} catch (IOException e) {
Expand Down

0 comments on commit 0192b25

Please sign in to comment.