致命信号 11 (SIGSEGV) 改造

Fatal signal 11 (SIGSEGV) Retrofit

我的模型

public class ModelMessage {
    private String message;
    public String getMessage() {
        return message;
    }
}

我的界面

public interface Noqta {
    @GET("api/")
    Call<ModelMessage> message();
}

我的电话 Activity 点击

Retrofit retrofit = new Retrofit.Builder()
                .baseUrl("http://noqta.tk/")
                .addConverterFactory(GsonConverterFactory.create())
                .build();
        Noqta noqta = retrofit.create(Noqta.class);
        Call<ModelMessage> call = noqta.message();
        call.enqueue(new Callback<ModelMessage>() {
            @Override
            public void onResponse(Call<ModelMessage> call, Response<ModelMessage> response) {
                if(response.isSuccessful()){
                    tv.setText("True");
                }else{
                    tv.setText("False");
                }
            }
            @Override
            public void onFailure(Call<ModelMessage> call, Throwable t) {
                tv.setText("Error");
            }
        });

json 正文在 noqta 上。tk/api

{"message":"Hello World from api web"}

我做错了什么? 我有清单的互联网许可

将这两行添加到 build.gradle 的 android 部分:

android{
    compileOptions {
            sourceCompatibility 1.8
            targetCompatibility 1.8
    }
}

有人可以向我解释为什么这是解决方案吗? 我看到错误在:

.baseUrl("http://noqta.tk/")

编辑

https://developer.android.com/studio/write/java8-support