在其后加上这个即可:android:orientation=”horizontal”
原来是<color name=”mycolor”>#7fff00</color> 双引号要改成英文的双引号:<color name=”mycolor”>#7fff00</color>
<siwi.map.android.ActionBar这一行老是出错,将自定义控件放到R.java文件所在的package中,就可以解决
因为要设置主题,在AndroidManifest.xml中的
原因是工程目录libs/armeabi/下的liblocSDK3.so未加载成功,将liblocSDK3.so加载过来即可。
将libs下的jar文件删除。
将错误代码段用
if(!isInEditMode()){
//造成错误的代码段
} 包起来,这样在Eclipse中显示时将跳过此代码段而不再出现错误。
往actionbar中添加listview报这个错,在对应的listview的xml中将id修改为android:id=”@id/android:list”(自己定义的adapter也是一样的,然后findViewById(android.R.id.list)即可) 原来是用的SherlockListFragment,改成SherlockFragment即可。
原来是adb版本的问题,找到一个包含四个文件的adb,解决。
adb的命令行权限是($),获得root权限即可,运行命令->su,若手机root过了,则命令行图标会变成(#),解决。
</div> Android是基于Linux开发的,其所使用的文件系统当然也是Linux内核所能支持的,比如YAFFS或者Ext3等,在这些文件系统里,是没有盘符概念的,而且路径名是使用斜杠“/”来分隔的,这一点,Windows系统和它有着明显的区分:Windows文件系统中有盘符(F:/,C:/),并且路径是用反斜杠“/”来分隔。 因此上面的adb push命令的第二个参数 mnt/sdcard 是不伦不类的表示法,问题就出在这里。 解决办法: 将第二个参数,也就是\system\sqlite3.exe改成/system/sqlite3.exe即可。 这个命令还是很特别的,两个参数面向的平台可以是不同的,因此,如sele果在Linux系统下就不会出现这个问题了.可参考此页
</div> 原因是传递的Parcelable对象里面的对象也要Parcelable或者Serializable
</div> 在自定义空间要用全路径名,<PullDownView 改成<siwi.map.android.PullDownView即可。
</div> 若一个activity声明周期结束了,但是Toast是放在消息队列尾部执行,所以不知道activity声明周期是否结束了,然后Toast的UI就会直接当掉,所以最好在Toast前加入activity是否结束的判断标志。
</div> URL的http改成https
在proguard.cfg中加入此句:
-dontwarn org.xmlpull.v1.XmlPullParser
-dontwarn org.xmlpull.v1.XmlSerializer
</div>
</div> 因为值是int,所以报错,转成string即可,dishNumber.setText(“” + items.get(dish.get_dishID()).get_totalNum());
</div> UI更新要放到主线程中,比如adapter.notifyDataSetChanged();
在引用了此library的工程下,Project->Properties->Java Build Path->Projects,删除掉actionbarsherlock工程,因为这里是生成apk的地方。
</div> 原来是我在程序中new了两次SQLiteOpenHelper,删掉其中一个即可
</div> armeabi/liblocSDK3.so文件未导入进来,导入后clean即可。
</div> In the last release of android sdk directory structure has changed. Build tools like aapt or dex has been moved from platform-tools to build-tools directory. Support for new directory structure was added in maven-android-plugin version 3.6.0 but you use version 3.4.1. Changing plugin version to 3.6.0 in pom.xml must help. Here is snippet from my pom.xml:(reference from this page)
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<androidManifestFile>src/main/other/AndroidManifest.xml</androidManifestFile>
<resourceDirectory>src/main/resources</resourceDirectory>
<sourceDirectory>src/main/java</sourceDirectory>
<sdk>
<platform>17</platform>
<path>/opt/android-sdk/</path>
</sdk>
<manifest>
<debuggable>true</debuggable>
</manifest>
</configuration>
<extensions>true</extensions>
</plugin> * <div style="color:#F00">[ERROR] Unresolveable build extension: Plugin com.dynamicobjx.buildtools:dynamicobjx-build-tools:1.3.1 or one of its dependencies could not be resolved: Could not find artifact com.dynamicobjx.buildtools:dynamicobjx-build-tools:jar:1.3.1 in central (http://repo1.maven.org/maven2) -> [Help 2]
</div> Apparently, maven3 started ignoring my repository configs and wasn’t seeing our repo definition of our internal repo. Pulling our buildtools module (via webdav) worked perfectly fine with maven 2 so this was really an unpleasant surprise to us to say the least. Anyway, we’ve resolved this issue since then (took a few hours =/) and the fix that we had for this was moving the declaration of the module dependency to the declaration of the plugin:
<plugin>
<groupId>org.apache.maven.plugins\</groupId>
<artifactId>maven-checkstyle-plugin\</artifactId>
<version>2.6\</version>
<dependencies>
<dependency>
<groupId>com.dynamicobjx.buildtools\</groupId>
<artifactId>dynamicobjx-build-tools\</artifactId>
<version>1.3.1\</version>
</dependency>
</dependencies>
</plugin> And declaring our internal report in pluginRepositories:
<pluginRepositories>
<pluginRepository>
<id>com.myrepo</id>
<name>My Repo</name>
<url>http://myrepo.com</url>
</pluginRepository>
</pluginRepositories> Hopefully, this helps out anyone seeing the same errors.[referenced from this page](http://dynamicobjx.com/2011/07/05/maven3-unresolveable-build-extension/) * <div style="color:#F00">@RequestMapping(value = "Jsp/UsersGroupReader.html", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) Error: The attribute produces is undefined for the annotation type RequestMapping
</div> 将spring web的版本更新到spring 3.1.0.RELEASE以上即可解决。
改为
@ElementMap(entry="property", key="key", attribute=true, inline=true) private Map<Integer, MOrdersFormItem> _items; // 不能直接new
</div> 对于自定义的类不能用@XmlElement(name=”state”),只需直接定义set,get即可正常传输。
</div>
@RequestMapping(value = "download_image/{image_info}", method = RequestMethod.GET, headers="Accept=image/jpeg, image/jpg, image/png, image/gif")
byte[] getPhoto(@PathVariable String image_info/*此变量命名必须和前面的{image_info}一样*/) {
// image_info
} * <div style="color:#F00">java.lang.IllegalArgumentException: Service not registered: siwi.map.android.Home$2@423e76c8
</div> bindservice和unbindservice都要用同一个context,比如都用getApplicationContext
</div> 传送的接口类最好用自动生成的constructor和get、set等,(而自动生成的constructor,即使class A未继承任何类,还是会自动生成super(),所以需要去掉。)
</div> 在pom.xml中加入此句
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency> * <div style="color:#F00">java.lang.ClassNotFoundException: org.springframework.security.ui.session.HttpSessionEventPublisher spring 2.0.5
</div> 在3.0.1以上改成了org.springframework.security.web.session.HttpSessionEventPublisher
</div> 请检查网络连接
</div> http://mvnrepository.com/artifact/org.springframework/spring-orm
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${org.springframework-version}</version>
</dependency> * <div style="color:#F00">The type org.hibernate.LockMode cannot be resolved. It is indirectly referenced from required .class files
</div> import org.springframework.orm.hibernate3.support.HibernateDaoSupport; 但没有把 hibernate 包加到项目中; 而在用 this.getHibernateTemplate().update(book);时,内部会用到事务,从而用到 org.hibernate.lockmode这个类。而这个类就放在hibernate jar包中; 所以就出现了上面的错误;http://hippoppower-sina-com.iteye.com/blog/666010
WUser.hbm.xml将<generator class=”sequence”/>改为<generator class=”native”/>
</div> —-