Better error for writeable dex mod import failure
This commit is contained in:
@@ -749,6 +749,7 @@ error.mapnotfound = Map file not found!
|
|||||||
error.io = Network I/O error.
|
error.io = Network I/O error.
|
||||||
error.any = Unknown network error.
|
error.any = Unknown network error.
|
||||||
error.bloom = Failed to initialize bloom.\nYour device may not support it.
|
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.rain.name = Rain
|
||||||
weather.snowing.name = Snow
|
weather.snowing.name = Snow
|
||||||
|
|||||||
@@ -107,6 +107,8 @@ public class ModsDialog extends BaseDialog{
|
|||||||
ui.showErrorMessage("@feature.unsupported");
|
ui.showErrorMessage("@feature.unsupported");
|
||||||
}else if(error instanceof HttpStatusException st){
|
}else if(error instanceof HttpStatusException st){
|
||||||
ui.showErrorMessage(Core.bundle.format("connectfail", Strings.capitalize(st.status.toString().toLowerCase())));
|
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{
|
}else{
|
||||||
ui.showException(error);
|
ui.showException(error);
|
||||||
}
|
}
|
||||||
@@ -189,7 +191,7 @@ public class ModsDialog extends BaseDialog{
|
|||||||
mods.importMod(file);
|
mods.importMod(file);
|
||||||
setup();
|
setup();
|
||||||
}catch(Exception e){
|
}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);
|
Log.err(e);
|
||||||
}
|
}
|
||||||
}, "zip", "jar");
|
}, "zip", "jar");
|
||||||
|
|||||||
@@ -26,4 +26,4 @@ org.gradle.caching=true
|
|||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
android.enableR8.fullMode=false
|
android.enableR8.fullMode=false
|
||||||
archash=c1e3b23ddd
|
archash=079015dec0
|
||||||
|
|||||||
Reference in New Issue
Block a user