当尝试从git://github.com/osmdroid/osmdroid构建OpenStreetMapView时,我收到此错误:
failed to find target with hash string android-23: D:\Users\myusername\AppData\Local\Android
Run Code Online (Sandbox Code Playgroud)
我怎样才能解决这个问题?以前类似的问题建议检查android 23是否未安装,但在我的情况下,确实如此.
以下是一些相关信息:
ANDROID_HOME是 D:\Users\myusername\AppData\Local\Android\sdk
D:\Users\myusername\AppData\Local\Android\sdk\platforms\ 包含目录\ android-23 \,(以及android-19,android-21,android-22,android-MNC)
的build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "org.osmdroid.example"
minSdkVersion 8
targetSdkVersion 23
versionCode 16
versionName "4.4-SNAPSHOT"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
}
lintOptions {
abortOnError false
}
}
dependencies {
compile 'android.support:compatibility-v4:23+'
compile project(':osmdroid-android')
//compile 'org.osmdroid:osmdroid-third-party:4.4-SNAPSHOT'
}
Run Code Online (Sandbox Code Playgroud)
我尝试将targetSdkVersion和compileSdkVersion更改为22.这会导致错误消息更改为"android-22"而不是"android-23".
我按照这里给出的说明创建一个Git存储库.一切顺利到最后一行:
$ git push -u origin master
Run Code Online (Sandbox Code Playgroud)
致命:'origin'似乎不是一个
致命的git存储库:远程端意外挂断
我在OS X 10.6.8上使用git版本1.7.11.3
$ git remote -v
Run Code Online (Sandbox Code Playgroud)
没有回报
存储库的配置文件:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
Run Code Online (Sandbox Code Playgroud)
我必须使用sudo visudo命令打开sudoers文件,并在其中添加以下内容(在#User privilege规范下):
git ALL=(ALL) ALL.
Run Code Online (Sandbox Code Playgroud)
如果我这样做:
$ git remote add origin /Volumes/500GB/git-repository/myproject.git
Run Code Online (Sandbox Code Playgroud)
它没有错误,但我没有在存储库中看到任何代码(它有上述目录,如分支,钩子,......)
如果我做:
$ git push -u origin master
fatal: 'origin' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
$ git remote -v …Run Code Online (Sandbox Code Playgroud) 我希望我的datagrid只允许选择一行.
我想我可以通过向datagridviews selectionChanged-event添加代码来实现这一点,但是有更好的解决方案吗?
我宁愿只设置一个属性,即: mydatagridview.maximumNrOfRowsSelected = 1; 或类似的东西.
有这样的事吗?
此活动已经有一个由窗口装饰提供的操作栏.不要在主题中请求Window.FEATURE_ACTION_BAR并将windowActionBar设置为false以使用工具栏代替
这是我得到的错误,我搜索了解决方案,但我没有找到如何解决它.这是我的代码:
styles.xml
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/myPrimaryColor</item>
<item name="colorPrimaryDark">@color/myPrimaryDarkColor</item>
<item name="colorAccent">@color/myAccentColor</item>
<item name="android:textColorPrimary">@color/myTextPrimaryColor</item>
</style>
<style name="ActionBarPopupThemeOverlay" parent="Theme.AppCompat.Light.NoActionBar">
<item name="windowActionBar">false</item>
</style>
<style name="Toolbartitle" parent="@style/TextAppearance.Widget.AppCompat.Toolbar.Title">
<item name="android:textColor">@android:color/white</item>
</style>
<style name="ToolbarSubtitle" parent="@style/TextAppearance.Widget.AppCompat.Toolbar.Subtitle">
<item name="android:textColor">#56FFFFFF</item>
</style>
Run Code Online (Sandbox Code Playgroud)
send_comment.xml(我的活动布局)
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.Toolbar
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/my_toolbar"
android:layout_height="128dp"
app:popupTheme="@style/ActionBarPopupThemeOverlay"
android:layout_width="match_parent"
android:background="?attr/colorPrimary"
android:paddingLeft="72dp"
android:paddingBottom="16dp"
android:gravity="bottom"
app:titleTextAppearance="@style/Toolbartitle"
app:subtitleTextAppearance="@style/ToolbarSubtitle"
app:theme="@style/ThemeOverlay.AppCompat.Light"
android:title="?????"
/>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
SendComment.java
public class SendComment extends ActionBarActivity {
private Toolbar toolbar;
@Override
protected void onCreate(Bundle savedInstanceState) { …Run Code Online (Sandbox Code Playgroud) 我有变量:
String owner="Mike";
String[] columns ={"quantity", "price","owner"}
Run Code Online (Sandbox Code Playgroud)
我的光标正试图搞定
Cursor findEntry = db.query("sku_table", columns, "owner="+owner, null, null, null, null);
我收到错误没有这样的列错误
android.database.sqlite.SQLiteException: no such column: owner: , while compiling: SELECT quantity, price, owner, FROM sku_table WHERE owner=Mike
Run Code Online (Sandbox Code Playgroud)
但是如果我接受这个查询:
SELECT quantity, price, owner, FROM sku_table WHERE owner=Mike
Run Code Online (Sandbox Code Playgroud)
并添加""到Mike,并在sqlite浏览器中测试以执行查询,我确实得到了回行.工作查询如下所示:
SELECT quantity, price, owner, FROM sku_table WHERE owner="Mike"
Run Code Online (Sandbox Code Playgroud)
有人可以放弃一些有关如何合并双引号的见解吗?除了使用"谢谢!
可能以前曾问过这个问题,但我不明白这个概念.你能帮帮我吗?
今天早上奇怪的问题..看到我只是把我的文件推到谷歌云计算然后显示下面的错误..我不知道在哪里看到该错误.
ri@ri-desktop:~$ gcloud compute --project "project" ssh --zone "europe-west1-b" "instance"
Warning: Permanently added '192.xx.xx.xx' (ECDSA) to the list of known hosts.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255].
Run Code Online (Sandbox Code Playgroud) 我在运行时收到此异常:
android.view.InflateException:二进制XML文件行#8:错误膨胀类android.support.v7.widget.RecyclerView
引起:java.lang.ClassNotFoundException:未找到类"android.support.v7.widget.RecyclerView"在路径上:/data/app/my.package.location-1.apk
关于这个错误有一些问题,我从中学到了:
- support.v7在xml和Java代码中准确指定RecyclerView.
- 在Eclipse中,我将这个jar文件作为库添加到项目中:
adt-bundle-windows-x86_64-20140321\sdk\extras\android\support\v7\recyclerview\libs\android-support-v7-recyclerview.jar
-在Eclipse中,导入*adt-bundle-windows-x86_64-20140321\sdk\extras\android\support\v7\recyclelerview*中的现有项目TestActivity,然后将该项目添加到我自己项目的Java Build Path中.
Project Build Target是Android 5.1.1/API 22
一切都没有效果.那里还有什么?
来自MyFragment.java
import android.support.v7.widget.RecyclerView;
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
final Activity thisActivity = getActivity();
final RecyclerView recyclerView = (RecyclerView)thisActivity.findViewById(R.id.my_listview);
final List<String> list = Arrays.asList(HEADERS);
final MyRecyclerAdapter adapter = new MyRecyclerAdapter(list);
recyclerView.setAdapter(adapter);
}
Run Code Online (Sandbox Code Playgroud)
MyRecyclerAdapter.java
import android.support.v7.widget.RecyclerView;
public class MyRecyclerAdapter extends RecyclerView.Adapter<MyRecyclerAdapter.ViewHolder> {
private ArrayList<String> mDataset;
// Provide a suitable constructor (depends on the kind of dataset)
public MyRecyclerAdapter(List<String> list) { …Run Code Online (Sandbox Code Playgroud) VS 2010 Pro,C#,WinForms:在我的方法的最开始,我说的是Debug.Writeline("输入方法等等"); 然后我在这个方法的某个地方放置一些断点并运行程序.所以我看到执行在那些断点处停止了,所以就在这里!但如果我搜索输出 - >调试组合框模式和立即窗口我找不到我为任何地方的Denug.Writeline写的消息...我也尝试在调试选项中的复选框设置"将所有输出重定向到立即窗口" "......也没有帮助.
我有Fragment一个TableLayout.表中的数据来自SQLite数据库.SQLite数据库是从一个RESTful Web服务中填充AsyncTask的MainActivity.将Fragment必须等待任务填充表之前完成.在Fragment为任务监听onPostExecute()方法被调用.当是时,该方法onLoadAndStoreComplete()在Fragment被调用.这一切都有效.
我需要在片段TableLayout的OnCreateView()方法之外看到一个视图.如果我可以获得片段的视图,onLoadAndStoreComplete那将会让我在那里.
与此处相同的代码.
我mContext从MainActivity获得,但没有getView()与之相关的方法.
我已经尝试过:
- 创建一个类成员rootView并在onCreateView()中进行分配,但是在onLoadAndStoreComplete()它中,它是null.
- 创建一个类成员tableLayout并在onCreateView()中分配,但在onLoadAndStoreComplete(),它是null.
- 再次调用this.getView()onLoadAndStoreComplete(),但它返回null.
- 调用内部的充气机 onLoadAndStoreComplete(),这是有效的,但后来我不知道在.inflate()呼叫中 使用什么容器
我不明白为什么rootView和tableLayout的类成员值为null onLoadAndStoreComplete()
public class MyFragment extends Fragment implements OnLoadAndStoreCompleteListener {
private TableLayout tableLayout;
private View rootView;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
mContext …Run Code Online (Sandbox Code Playgroud) 我收到以下错误:
不是错误(代码0):无法以读/写模式打开数据库.
我已经添加了
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Run Code Online (Sandbox Code Playgroud)
我正在尝试在SD卡中存在的数据库中输入数据,我能够通过"OPEN_READONLY"读取数据库中已存在的数据.使用"OPEN_READWRITE"时出错