我刚刚使用新的构建工具21.0.2和新的gradle 2.1将我的一个项目更新到Android L.
现在,只要我在我的系统上构建项目,我就会遇到以下异常:
import com.tundem.aboutlibraries.R;
^
symbol: class R
location: package com.tundem.aboutlibraries
java.lang.NullPointerException
at com.sun.tools.javadoc.TypeMaker.getType(TypeMaker.java:83)
at com.sun.tools.javadoc.TypeMaker.getType(TypeMaker.java:44)
at com.sun.tools.javadoc.ClassDocImpl.superclassType(ClassDocImpl.java:496)
at com.sun.tools.doclets.internal.toolkit.util.Util.getAllInterfaces(Util.java:459)
4 warnings
at com.sun.tools.doclets.internal.toolkit.util.Util.getAllInterfaces(Util.java:497)
at com.sun.tools.doclets.internal.toolkit.util.ClassTree.processType(ClassTree.java:194)
at com.sun.tools.doclets.internal.toolkit.util.ClassTree.buildTree(ClassTree.java:146)
at com.sun.tools.doclets.internal.toolkit.util.ClassTree.<init>(ClassTree.java:91)
at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:123)
at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractDoclet.java:83)
at com.sun.tools.doclets.formats.html.HtmlDoclet.start(HtmlDoclet.java:63)
at com.sun.tools.doclets.standard.Standard.start(Standard.java:39)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:280)
at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:160)
at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:397)
at com.sun.tools.javadoc.Start.begin(Start.java:167)
at com.sun.tools.javadoc.Main.execute(Main.java:59)
at com.sun.tools.javadoc.Main.main(Main.java:49)
:sample:lintVitalRelease FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':library:generateDebugJavadoc'.
> Javadoc …Run Code Online (Sandbox Code Playgroud) 如何将MaterialDrawer菜单放在ActionBar上面?现在,当我打开MaterialDrawer菜单时,我的ActionBar就位于它之上.CSS中是否有像Z-index这样的东西?:D我的应用程序风格:
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="AppTheme" parent="Theme.AppCompat.Light">
<item name="actionBarStyle">@style/ActionBar</item>
</style>
<style name="ActionBar" parent="Widget.AppCompat.Light.ActionBar">
<item name="background">@color/yellow_dark</item>
</style>
</resources>
Run Code Online (Sandbox Code Playgroud)
我的MaterialDrawer初始化代码:
DrawerBuilder().withActivity(activity).addDrawerItems(...).withSelectedItem(-1).withTranslucentStatusBar(false).withActionBarDrawerToggle(false).build()
Run Code Online (Sandbox Code Playgroud) 目前我正在尝试使用样式表,我通过if.但它没有做任何事情.
这是我目前的代码.变量$ stylesheet将是可变的,但在测试时我已将其设置为正常
<?php
$stylesheet = 'normal'
if ($stylesheet = 'small')
{
$style = './sitestyle/stylesheetsmall.css';
}
if ($stylesheet = 'big')
{
$style = './sitestyle/stylesheetbig.css';
}
else
{
$style = './sitestyle/stylesheet.css';
}
echo '<link rel="stylesheet" type="text/css" href="$style">';
?>
Run Code Online (Sandbox Code Playgroud)
谢谢你的回答.
如何将整数变量传递给xml动画,如下所述:
<alpha
android:interpolator="@android:anim/decelerate_interpolator"
android:fromAlpha="0.0" android:toAlpha="1.0"
android:duration="@android:integer/config_shortAnimTime"
/>
Run Code Online (Sandbox Code Playgroud)
我不知道该怎么做.目前我唯一知道的是我可以像这样硬编码 - >android:duration="200"
有人知道答案吗?
我的主机运行 Ubuntu 12.04 64 位。在主机上adb工作正常。但在VM(Ubuntu 12.04 32位/VMWare Workstation 8.0.4)中adb显示没有设备或设备离线。开始adb并root没有帮助。lsusb 显示设备:
Bus 001 Device 004: ID 18d1:4e12 Google Inc. Nexus One (debug)
Run Code Online (Sandbox Code Playgroud)