我昨天下载了最新版本(r14).但在运行任何应用程序时遇到此错误
ERROR: Unknown option '--no-crunch'
Run Code Online (Sandbox Code Playgroud)
请帮忙...
这是我的颜色列表:
static ArrayList<Integer> colors;
static {
colors = new ArrayList<Integer>();
colors.add(Color.parseColor("#43CFCF"));
colors.add(Color.parseColor("#1C6E9B"));
colors.add(Color.parseColor("#AC88C0"));
colors.add(Color.parseColor("#EE5640"));
colors.add(Color.parseColor("#EFBF4D"));
}
Run Code Online (Sandbox Code Playgroud)
这是我的可绘制数组:
static Drawable[] drawables;
static {
drawables = new Drawable[5];
drawables[0] = new GradientDrawable(Orientation.TL_BR, new int[]{colors.get(0), colors.get(1)});
drawables[1] = new GradientDrawable(Orientation.TL_BR, new int[]{colors.get(1), colors.get(2)});
drawables[2] = new GradientDrawable(Orientation.TL_BR, new int[]{colors.get(2), colors.get(3)});
drawables[3] = new GradientDrawable(Orientation.TL_BR, new int[]{colors.get(3), colors.get(4)});
drawables[4] = new GradientDrawable(Orientation.TL_BR, new int[]{colors.get(4), colors.get(0)});
}
Run Code Online (Sandbox Code Playgroud)
现在,我正在使用alpha动画迭代drawable [],并交叉淡入淡出第n和第(n + 1)个drawable.
现在这就是我的布局:

我的布局是矩形(GradientDrawable.Orientation:Topleft-BottomRight),但是这个方向值没有设置我的渐变线(颜色之间)从我的矩形的右上角到左下角.如果我的布局是SquareShape,它将完美地工作.
所以我想以编程方式设置每个GradientDrawable的角度(试错)(不能使用xml,因为我在代码中创建drawables,否则我将不得不创建5个xmls,每个drawable一个).
另外,如果我的方向是TL_BR,android:angle的值如何工作?角度是否随参考(轴)变化到TL_BR线(0弧度).
请帮忙!
我已经尝试使用PEAR连接到pear.phpunit.de和其他三个类似的连接,但由于连接超时,在PEAR更新连接后没有进展.
另外,我尝试通过在phpunit.php文件中更改@ PHPBIN @并重命名来安装没有PEAR的PHPunit,然后无法在DOS中将其作为可执行文件运行(chmod在DOS中无法工作,是按步骤编写的,我遵循)
有没有其他简单的方法可以让WUnit服务器在Windows下运行PHPUnit.请回复,目前挂在上面的所有东西.
我正在使用兼容包来实现API级别<11的CursorLoader根据doc和这个答案以及这个精彩的教程,我已经导入了支持包并实现了LoaderManager.LoaderCallbacks,但接下来我必须调用:
getSupportLoaderManager()
Run Code Online (Sandbox Code Playgroud)
并且为此必须扩展FragmentActivity,然后从Activity Context调用,但我已经扩展了ListActivity,并且想要进行静态调用以获取LoaderManager,如下所示:
FragmentActivity.getSupportLoaderManager()
Run Code Online (Sandbox Code Playgroud)
显然,这是一种让LoaderManager <11的方法,这就是文档所说的:
要管理片段和加载器,必须使用FragmentActivity.getSupportFragmentManager()和FragmentActivity.getSupportLoaderManager()方法(而不是getFragmentManager()和getLoaderManager()方法).
但它给出了这个编译时错误:
Cannot make a static call to a non-static method
Run Code Online (Sandbox Code Playgroud)
FragmentActivity的代码,getSupportLoaderManager()在这里不是静态的,这解释了错误,但为什么Doc显示静态调用...我现在很困惑......
请帮忙!