Error:(157, 34) エラー: シンボルを見つけられません
シンボル: メソッド setImageDrawable(<null>)
場所: タイプObjectの変数 finalIcon
とエラーが出ます。
Java
1 UserInfoApi api = ServiceGenerator.createService(UserInfoApi.class,aToken); 2 3 Call<UserInfo> call = api.getUserInfo(); 4 5 call.enqueue(new Callback<UserInfo>() 6 { 7 @Override 8 public void onResponse(Call<UserInfo> call, Response<UserInfo> UserInfoResponse){ 9 String email = UserInfoResponse.body().getEmail(); 10 Integer id = UserInfoResponse.body().getId(); 11 String username = UserInfoResponse.body().getUsername(); 12 Object area = UserInfoResponse.body().getArea(); 13 String bio = UserInfoResponse.body().getAttribute(); 14 String sex = UserInfoResponse.body().getSex(); 15 Object birthday = UserInfoResponse.body().getBirthday(); 16 Object icon = UserInfoResponse.body().getIcon(); 17 18 19 mailEdit.setText(email); 20 21 passEdit.setText(String.valueOf(id)); 22 if (username !=null) { 23 usernametext.setText(String.valueOf(username)); 24 } 25 if (area !=null) { 26 areatext.setText(String.valueOf(area)); 27 } 28 if (area !=null) { 29 areatext.setText(String.valueOf(area)); 30 } 31 if (bio !=null) { 32 introductiontext.setText(String.valueOf(bio)); 33 } 34 if (sex !=null) { 35 sextext.setText(String.valueOf(sex)); 36 } 37 if (birthday !=null) { 38 birthdaytext.setText(String.valueOf(birthday)); 39 } 40 if (icon !=null) { 41 icon= (ImageButton) findViewById(R.id.icon); 42 final Object finalIcon = icon; 43 icon.setOnClickListener(new View.OnClickListener(){ 44 public void onClick(View v){ 45 46 bitmap = RadiusImage(bitmap); 47 finalIcon.setImageDrawable(null); 48 finalIcon.setImageBitmap(bitmap); 49 } 50 }); 51 52 53 } 54 else { 55 56 57 } 58 } 59
privateなどで何かインポートしなければならないのでしょうか?
それとも宣言がないのでしょうか?
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2016/07/31 01:00
2016/07/31 01:08
退会済みユーザー
2016/07/31 04:49
退会済みユーザー
2016/07/31 04:49
2016/07/31 14:13