小编Luf*_*ffy的帖子

VM Aborting:致命信号6(SIGABRT)位于0x00001247(代码= -6)

我正在使用eclipse棒棒糖版.

我收到此错误:

虚拟机中止

致命信号6(SIGABRT)位于0x00001247(代码= -6)

下面我发布了完整的堆栈跟踪:

堆栈跟踪:

01-30 04:11:43.053: E/dalvikvm(4679): VM aborting

01-30 04:11:43.053: A/libc(4679): Fatal signal 6 (SIGABRT) at 0x00001247 (code=-6), thread 4679 (e.quranmadeeasy)

01-30 04:11:43.541: D/dalvikvm(4749): GC_FOR_ALLOC freed 124K, 6% free 3345K/3528K, paused 2ms, total 2ms
01-30 04:11:43.541: I/dalvikvm-heap(4749): Grow heap (frag case) to 4.395MB for 1127532-byte allocation
01-30 04:11:43.541: D/dalvikvm(4749): GC_FOR_ALLOC freed 0K, 4% free 4446K/4632K, paused 1ms, total 1ms
Run Code Online (Sandbox Code Playgroud)

Logcat没有指出错误行.所以我不知道如何解决这个错误.我试过这个答案.但它对我没有帮助.任何帮助都是最受欢迎的.谢谢.

android

6
推荐指数
1
解决办法
1万
查看次数

如何在nativescript中为stacklayout提供border和border-radius

我是nativescript的新手.我不知道如何给stacklayout提供border和border-radius.

下面我发布了我到目前为止所尝试的内容:

component.html:

 <StackLayout class ="stackBorder" orientation="horizontal">
    <Label text="Label 1" width="50" height="50" > </Label>
    <Label text="Label 2" width="50" height="50" > </Label>
    <Label text="Label 3" width="50" height="50" backgroundColor="white"> </Label>
    <Label text="Label 4" width="50" height="50" backgroundColor="white"> </Label>
  </StackLayout>
Run Code Online (Sandbox Code Playgroud)

component.css:

StackLayout {
  margin: 10;
  background-color: green;

}

.stackBorder {
 border: 2px solid red;
   border-radius: 8px;
}
Run Code Online (Sandbox Code Playgroud)

component.ts:

@Component({
    selector: "sdk-child-component",
    moduleId: module.id,
    templateUrl: "./component.html",
    styleUrls: ["./component.css"]
})
Run Code Online (Sandbox Code Playgroud)

最后我无法在stacklayout中看到边框.

css typescript nativescript angular2-nativescript

6
推荐指数
2
解决办法
3486
查看次数

如何向这些现有编码添加滑动视图

  • 我需要添加一个swipe view.tab activity在下面的xml编码中,我刚创建了一个six tabs家庭,博客,音频,视频,更多和画廊.

  • Tabs是完美创建的.但我无法知道如何为这六个标签添加滑动.我需要添加从右向左滑动和从左向右滑动.

layout_home.xml:

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >

    <TabHost
        android:id="@android:id/tabhost"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" >

        <LinearLayout
             android:orientation="vertical"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
             >

               <TabWidget
                android:id="@android:id/tabs"
                android:orientation="horizontal"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentTop="true"
                android:background="@drawable/bottom_bar"
                android:layout_weight="0" />

               <FrameLayout
                android:id="@android:id/tabcontent"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                >

                <FrameLayout
                    android:id="@+id/tab_home"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent" />

                <FrameLayout
                    android:id="@+id/tab_video"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent" />

                <FrameLayout
                    android:id="@+id/tab_audio"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent" >
                </FrameLayout>

                <FrameLayout
                    android:id="@+id/tab_blog"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent" >
                </FrameLayout>

                <FrameLayout
                    android:id="@+id/tab_gal"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent" >
                </FrameLayout>

                <FrameLayout
                    android:id="@+id/tab_more"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent" > …
Run Code Online (Sandbox Code Playgroud)

android swipe swipe-gesture

5
推荐指数
1
解决办法
743
查看次数

Azure数据库连接错误.

你好朋友,

我是Azure的新手.并且仍在学习所有内部事物.我正在尝试连接数据库并获得以下异常.任何指针都会非常感激吗?

我想知道是否有人经历过这个或者原因是什么?连接到DB:

 System.Data.SqlClient.SqlException was unhandled by user code
      HResult=-2146232060
      Message=Cannot open server 'XXXX' requested by the login. Client with IP address 'XX.XX.XX.XX' is not allowed to access the server.  To enable access, use the Windows Azure Management Portal or run sp_set_firewall_rule on the master database to create a firewall rule for this IP address or address range.  It may take up to five minutes for this change to take effect.
    Login failed for user 'User'.
    This session has been …
Run Code Online (Sandbox Code Playgroud)

sql sql-server azure

5
推荐指数
1
解决办法
7493
查看次数

每次击中api时都会显示响应

我需要根据数组列表大小得到响应8次(动态).所以我用过loop.inside for for循环,我正在使用volley get response.

在每次点击api时,我需要获得onResponse.

下面我发布了logcat及相关代码:

Logcat :(已 编辑)

 E/getAvaArrStr: 
 E/urlAva: 

 E/getAvaArrStr: 
 E/urlAva: 

 E/getAvaArrStr: 
 E/urlAva: 

 E/getAvaArrStr: 
 E/urlAva: 

 E/getAvaArrStr: 
 E/urlAva:

 /* Response */

 E/ResponseAvatar: 
 E/url: 
 E/CheckArrBit: 

 E/ResponseAvatar: 
 E/url: 
 E/CheckArrBit: 

 E/ResponseAvatar: 
 E/url: 
 E/CheckArrBit: 

 E/ResponseAvatar: 
 E/url: 
 E/CheckArrBit: 
Run Code Online (Sandbox Code Playgroud)

CardsFragment.java :(已编辑)

RequestQueue queue = Volley.newRequestQueue(getActivity());

for (int i = 0; i < alAvaArr.size(); i++) {

    getAvaArrStr = alAvaArr.get(i);

    Log.e("getAvaArrStr", "" + getAvaArrStr);

    urlAva = BurblrUtils.BR_AVATAR_IMAGE + getAvaArrStr + "&android=1";

    Log.e("urlAva", urlAva);


    requestAva = new StringRequest(Request.Method.GET, urlAva, new Response.Listener<String>() {

        @Override
        public void onResponse(String …
Run Code Online (Sandbox Code Playgroud)

android android-volley

5
推荐指数
1
解决办法
1296
查看次数

无法在NestedScrollView内完全滚动

不知怎的,我无法在NestedScrollView中完全滚动.在我的NestedScrollView里面是一个TextView,它有很多文本,下面有一个按钮.当我向下滚动时,我只能看到按钮的顶部(只有几个像素).它滚动得不够远.

这是我的布局:

<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

<android.support.design.widget.AppBarLayout
        android:id="@+id/appbar"
        android:layout_width="match_parent"
        android:stateListAnimator="@drawable/appbar_always_elevated"
        android:layout_height="128dp">

    <android.support.design.widget.CollapsingToolbarLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:contentScrim="?attr/colorPrimary"
            app:layout_scrollFlags="scroll|enterAlways|exitUntilCollapsed"
            app:toolbarId="@+id/toolbar">

        <android.support.v7.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                app:title="@string/app_name"
                app:layout_collapseMode="pin">

        </android.support.v7.widget.Toolbar>
    </android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>


<android.support.v4.widget.NestedScrollView
        app:layout_behavior="@string/appbar_scrolling_view_behavior"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

    <LinearLayout
            android:orientation="vertical"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

        <TextView
                android:id="@+id/textView"
                style="@style/Text.Body1.Medium"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/margin"
                android:layout_marginTop="@dimen/margin"
                android:layout_marginEnd="@dimen/margin"
                android:text="@string/large_text"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/appbar"/>

        <Button
                android:id="@+id/continueButton"
                style="@style/Widget.Button.Green"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/margin"
                android:layout_marginStart="@dimen/margin"
                android:layout_marginEnd="@dimen/margin"
                android:layout_marginBottom="@dimen/margin"
                android:text="@string/continue_text"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"/>
    </LinearLayout>
   </android.support.v4.widget.NestedScrollView>

  </android.support.design.widget.CoordinatorLayout>
Run Code Online (Sandbox Code Playgroud)

layout android android-layout

5
推荐指数
1
解决办法
568
查看次数

单击设置图标创建新活动

如果我单击该settings图标,则必须创建新活动.但它显示弹出搜索.我发布了相关的代码和屏幕截图.

在此输入图像描述

在此输入图像描述

MainActivity.java:

@Override
    public boolean onCreateOptionsMenu(Menu menu) {

        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }
    @Override
    public boolean onOptionsItemSelected(MenuItem item) 
    {
       switch (item.getItemId()) 
       {
         case R.id.search:
            Intent intent = new Intent(this, SettingsActivity.class);
      //      intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
            startActivity(intent);
            return true;
         default:
            return super.onOptionsItemSelected(item);
       }
    }
Run Code Online (Sandbox Code Playgroud)

main.xml中:

<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools" >

    <item
        android:id="@+id/search"
        android:icon="@drawable/ic_action_settings"
        android:title="@string/search"/>

</menu>
Run Code Online (Sandbox Code Playgroud)

如果我点击该图标,则必须创建新活动.但它显示弹出窗口search.我不需要弹出窗口.只需单击设置图标就可以移动到新活动.到目前为止,我完成了像这样的代码.

android menu android-actionbar

4
推荐指数
1
解决办法
992
查看次数

导入com.google.android.gms.location.LocationClient无法解析

我收到了这个编译错误.我在同一个工作区中添加了google play服务库.然后成功添加了最新的sdk(工具,附加组件).

但我不知道为什么这个错误仍然会发生.

import com.google.android.gms.location.LocationClient;  -->import cannot be resolved


public class Main extends Activity implements
        GooglePlayServicesClient.ConnectionCallbacks,
        GooglePlayServicesClient.OnConnectionFailedListener {

private LocationClient mLocationClient;   --->LocationClient cannot be resolved to a type


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

    mLocationClient = new LocationClient(this, this, this);

}
}
Run Code Online (Sandbox Code Playgroud)

控制台中:

我得到这个,找不到与给定名称匹配的资源(在'value'处,值为'@ integer/google_play_services_version').

表现:

 <uses-sdk
    android:minSdkVersion="16"
    android:targetSdkVersion="21" />

   <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />

........
</application>
Run Code Online (Sandbox Code Playgroud)

编辑:

在此输入图像描述

在此输入图像描述

任何人都可以帮助我.谢谢你.

android google-maps

4
推荐指数
1
解决办法
1万
查看次数

CORS策略:离子2中请求的资源上没有"Access-Control-Allow-Origin"标头

编辑:

我是混合开发的新手.我引用这个Sample来使用ionic2解析listview中的json.但是当我运行代码时,我只能看到浏览器中的空白屏幕.

下面我发布了代码.请检查 :

pages.ts:

import { Component } from '@angular/core';
import {Http} from '@angular/http';
import { NavController } from 'ionic-angular';
import 'rxjs/add/operator/toPromise';
@Component({
  selector: 'page-home',
  templateUrl: 'pages.html'
})
export class SlidingPage {
public items:any;
  constructor(public navCtrl: NavController,public http: Http) {
      this.http = http;
        this.http.get("http://api.randomuser.me/?results=10")
            .subscribe(data =>{

             // console.log(data['_body']);

          //   this.items=JSON.parse(data['_body']).results;//Bind data to items object

            this.items = data.json();


            },error=>{
                console.log(error);// Error getting the data
            } );
  }
buttonClick(event){
   console.log("button clicked");
   console.log(event);
  }
  itemClicked(event,itemData){
    console.log("item clicked");
    console.log(event);
    console.log(itemData);
  } …
Run Code Online (Sandbox Code Playgroud)

typescript hybrid-mobile-app ionic2 angular2-routing

4
推荐指数
1
解决办法
7713
查看次数

如何在单击angular2本机脚本时打开按钮上的playstore应用程序URL

单击按钮时,我需要在playstore应用程序的帮助下打开playstore应用程序URL。我有来自Playstore的许多应用程序网址。

例如: https //play.google.com/store/apps/details?id = com.ninjakiwi.bftg

应用程序不应在浏览器的帮助下打开。单击按钮时,它必须在官方google playstore应用程序的帮助下打开。

typescript nativescript angular2-nativescript angular

3
推荐指数
1
解决办法
1426
查看次数