2016-07-04 16 views
0

私はgitのlink上のサンプルを持っている(それは複雑ではありません)互換性のあるコンパイル方法を作成するには?

VerticalSeekBarクラスとメソッドsetProgress()

private synchronized void setProgress(int progress, boolean fromUser) { 
    if (mMethodSetProgress == null) { 
     try { 
      Method m; 
      m = this.getClass().getMethod("setProgress", int.class, boolean.class); 
      m.setAccessible(true); 
      mMethodSetProgress = m; 
     } catch (NoSuchMethodException ignored) { 
     } 
    } 

    if (mMethodSetProgress != null) { 
     try { 
      mMethodSetProgress.invoke(this, progress, fromUser); 
     } catch (IllegalArgumentException | IllegalAccessException | InvocationTargetException ignored) { 
     } 
    } else { 
     super.setProgress(progress); 
    } 
    refreshThumb(); 
} 

内部の問題があるさ - compileSdkVersion場合 - 23すべてはOKですが、 compileSdkVersion場合 - 24、IDEAは私が変更が必要だと言います privateから public、すべてが行われました。私は自分のアプリを起動し、私の変更メソッドのために何も働かない setProgress()それ自身を呼び出し、私は無限ループを得る...

私はどうすればcompileSdkVersionを24に変更できますか?

答えて

0

enter image description hereプロジェクト構造 - >プロパティ - >コンパイルsdkバージョンに移動します。
あなたのSDKバージョンを選択

関連する問題