mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-31 01:44:22 +07:00
Better error for writeable dex mod import failure
This commit is contained in:
parent
82de8ca468
commit
c7def5fa54
@ -749,6 +749,7 @@ error.mapnotfound = Map file not found!
|
||||
error.io = Network I/O error.
|
||||
error.any = Unknown network error.
|
||||
error.bloom = Failed to initialize bloom.\nYour device may not support it.
|
||||
error.moddex = Mindustry is unable to load this mod.\nYour device is blocking import of Java mods due to recent changes in Android.\nThere is no known workaround to this issue.
|
||||
|
||||
weather.rain.name = Rain
|
||||
weather.snowing.name = Snow
|
||||
|
@ -107,6 +107,8 @@ public class ModsDialog extends BaseDialog{
|
||||
ui.showErrorMessage("@feature.unsupported");
|
||||
}else if(error instanceof HttpStatusException st){
|
||||
ui.showErrorMessage(Core.bundle.format("connectfail", Strings.capitalize(st.status.toString().toLowerCase())));
|
||||
}else if(error.getMessage() != null && error.getMessage().toLowerCase(Locale.ROOT).contains("writable dex")){
|
||||
ui.showException("@error.moddex", error);
|
||||
}else{
|
||||
ui.showException(error);
|
||||
}
|
||||
@ -189,7 +191,7 @@ public class ModsDialog extends BaseDialog{
|
||||
mods.importMod(file);
|
||||
setup();
|
||||
}catch(Exception e){
|
||||
ui.showException(e);
|
||||
ui.showException(e.getMessage() != null && e.getMessage().toLowerCase(Locale.ROOT).contains("writable dex") ? "@error.moddex" : "", e);
|
||||
Log.err(e);
|
||||
}
|
||||
}, "zip", "jar");
|
||||
|
@ -26,4 +26,4 @@ org.gradle.caching=true
|
||||
org.gradle.internal.http.socketTimeout=100000
|
||||
org.gradle.internal.http.connectionTimeout=100000
|
||||
android.enableR8.fullMode=false
|
||||
archash=c1e3b23ddd
|
||||
archash=079015dec0
|
||||
|
Loading…
Reference in New Issue
Block a user