小编Adi*_*hya的帖子

curl_exec()始终返回false

我写了这段简单的代码:

$ch = curl_init();

//Set options
curl_setopt($ch, CURLOPT_URL, "http://www.php.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$website_content = curl_exec ($ch);
Run Code Online (Sandbox Code Playgroud)

在我的情况$website_content下来了false.任何人都可以建议/建议可能出错的事情吗?

php curl

101
推荐指数
2
解决办法
10万
查看次数

PL/SQL开发人员使用oracle 32位/ 64位客户端

我安装了Oracle 64位客户端以与我的weblogic应用程序一起运行.我了解到pl-sql开发人员无法使用oracle 64位客户端,所以现在我的机器上安装了32位和64位客户端,而我的ORACLE_HOME变量指向64位客户端.

即使我在pl-sql开发人员版本8.0.4的Tools-> Preferences中指定了32位客户端,我也无法启动pl/sql developer.

我将我的oracle客户端更改为32位客户端然后我能够启动pl-sql开发人员,但我的应用程序不起作用.

有没有办法在将ORACLE_HOME指向64位oracle客户端的同时运行PL/SQL开发人员.我不确定在工具 - >首选项中明确指定ORACLE_HOME pl sql开发人员(对于用户/默认以及系统首选项)有任何影响,因为它从我相信的环境变量中选择了oracle home.

谢谢,Adithya.

oracleclient plsqldeveloper

13
推荐指数
2
解决办法
8万
查看次数

Android中的Build Target和Min SDK版本

创建一个Android项目,如果我说我的Android项目的构建目标是2.2(API级别被选为8)和在Min SDK版本的文本框中.如果我将一些价值与构建目标的API级别(小于或大于8)区分开来,那么会发生什么?

构建是否根据指定的构建目标发生,但开发的应用程序与较小的Android版本兼容(如果我指定API级别<8).或者开发的应用程序仅兼容更高版本的Android版本(如果我指定API级别> 8).

有人可以解释一下吗?

android

11
推荐指数
2
解决办法
2万
查看次数

在优先活动中使用findviewbyid

我有一个首选项屏幕,我正在使用该android:layout属性指定布局资源.在首选项活动中,我使用addPreferencesFromResourcefrom onCreate方法来使用/扩充首选项.在布局内部我有很少的文本视图和按钮.

问题是我无法使用findViewById方法找到任何textview,复选框和按钮!findViewById返回的每个结果都为null.

编辑:

我需要将一个监听器附加到复选框.

谁能帮帮我呢?

编辑2:

1)preference_layout.xml

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="33dp"
    android:gravity="center_vertical"
    android:minHeight="33dp"
    android:id="@+id/preference_header_switch_item_responder_layout"
    style="?android:attr/listSeparatorTextViewStyle" >

    <CheckBox
    android:id="@+id/switchWidget"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:clickable="true"
    android:focusable="false"
    android:padding="8dip"
    android:layout_marginRight="14dip" />
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

2)偏好屏幕

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >

    <Preference
        android:defaultValue="false"
        android:key="auto_responder_key"
        android:widgetLayout="@layout/preference_layout"
        android:title="@string/auto_responder">
    </Preference>

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

3)对创建的偏好活动:

编辑3:

@Override
    protected void onCreate(Bundle savedInstanceState)
    {
        if(savedInstanceState != null && savedInstanceState.containsKey(HEADERS_KEY))
        {
            headers = savedInstanceState.getParcelableArrayList(HEADERS_KEY);
        }

        super.onCreate(savedInstanceState);
        applicationContext = getApplicationContext();

        setupSimplePreferencesScreen();
//      setContentView(getListView());
        headerCompound = findViewById(R.id.switchWidget);
        headerCompoundEmail = …
Run Code Online (Sandbox Code Playgroud)

android preferenceactivity android-preferences

8
推荐指数
1
解决办法
7338
查看次数

findViewById为首选项布局返回null

我有一个首选项屏幕(responder_generic.xml),如下所示:

<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >

    <Preference
        android:defaultValue="false"
        android:key="auto_responder_key"
        android:layout="@layout/preference_header_switch_item_responder"
        android:title="@string/auto_responder">
    </Preference>

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

我实例化如下:(版本2.3.3)

addPreferencesFromResource(R.xml.responder_generic);
Run Code Online (Sandbox Code Playgroud)

我的布局= preference_header_switch_item_responder看起来如下:

<?xml version="1.0" encoding="utf-8"?>
<!-- Layout of a header item in PreferenceActivity. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="33dp"
    android:gravity="center_vertical"
    android:minHeight="33dp"
    android:id="@+id/preference_header_switch_item_responder"
    style="?android:attr/listSeparatorTextViewStyle" >

    <RelativeLayout
        android:layout_width="0dip"
        android:layout_height="wrap_content"
        android:layout_marginLeft="5dp"
        android:layout_weight="1" >

        <TextView
            android:id="@+id/title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:ellipsize="marquee"
            android:fadingEdge="horizontal"
            android:singleLine="true"
            android:text="@string/auto_responder"
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:textStyle="bold" />

        <TextView
            android:id="@+id/summary"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@android:id/title"
            android:ellipsize="end"
            android:textAppearance="?android:attr/textAppearanceSmall" />
    </RelativeLayout>

    <include layout="@layout/compound_button" />

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

现在,我在layout文件夹中定义了复合按钮,layout/v-14分别如下:

<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android" …
Run Code Online (Sandbox Code Playgroud)

android android-preferences

7
推荐指数
1
解决办法
5913
查看次数

第一次自己的R.java没有生成

我已尽力生成R.java文件,但徒劳无功.我刚刚创建了一个android项目,在创建android项目时,它没有创建R.java文件!我的项目中存在编译错误,因为我仍然需要将android.jar文件添加到我的项目中,但即使添加了jar文件,清理现有构建并再次构建它也无法正常工作.

然后我在eclipse中检查了"自动构建"选项.即使这没有帮助!

很少有事情需要注意:

1)我用build-target android 2.2和API version 8创建了android项目.

2)我想告诉的是,在创建项目时,它给出了一个错误,说找不到proguard.cfg!我找不到'default.properties'文件来删除引用proguard.cfg条目的条目.

3)我的环境变量中的JAVA_HOME指向jdk1.4.不知道这不应该是这个原因!

4)内容

1.main.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"
    >
    <TextView  
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content" 
        android:text="@string/hello"
    />
    </LinearLayout>
Run Code Online (Sandbox Code Playgroud)

2.strings.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="hello">Hello World, HelloAndroidActivity!</string>
    <string name="app_name">Hello, Android !!</string>
</resources>
Run Code Online (Sandbox Code Playgroud)

3.AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.pack.android.test"
  android:versionCode="1"
  android:versionName="1.0">
<uses-sdk android:minSdkVersion="8" />

<application android:icon="@drawable/icon" android:label="@string/app_name">
    <activity android:name=".HelloAndroidActivity"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

</application>

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

4.Code for HelloWorldActivity.java

  package com.pack.android.test;

  import android.app.Activity;
  import android.os.Bundle;

  public …
Run Code Online (Sandbox Code Playgroud)

android

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

在android中为不同的组设置不同的指标

我想知道如何在ExpandableListView中为不同的组设置不同的指标.

我试过了 :

if(true condition for a group say groupA)
{
    getExpandableListView().setGroupIndicator(getResources().getDrawable(R.drawable.image));
}
Run Code Online (Sandbox Code Playgroud)

但是上面的代码设置了视图中所有组的指标!我想要所有组的不同指标,如:

groupA具有不同的指示符; groupB具有不同的指示符; groupC具有不同的指示符

其中groupA,groupB和groupC具有一定数量的子项.

谁能提出建议?

-Adithya.

android expandablelistview

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

无法查询库存:刷新库存时出错

我不明白为什么我在启动应用程序时不断收到以下消息:

错误:无法查询库存:IabResult:引用库存时出错(查询商品价格).(响应:6:错误)

我观察到,如果有可用的网络连接,那么我没有收到错误消息,并且在我关闭网络连接后也不会出现一段时间.但是再说几个小时后,如果没有网络,消息就会弹出!

有没有想过解决这个问题?这里有缓存吗?是否涉及某种超时?如果查询失败,我们是否应该只显示错误?

编辑:

我已通过使用测试帐户登录在我的设备上安装了该应用程序.我也购买了应用内功能.

这个问题是因为它是一个测试帐户吗?

任何帮助都会很棒.

谢谢,Adithya.

android in-app-purchase in-app-billing

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

android.widget.ExpandableListView中的组指示符

我必须在我的应用程序中填充ExpandableListView.ExpandableListView由一组组成,这些组又由一组子组成.

例如

**组 1

...ChildA

...ChildB
Run Code Online (Sandbox Code Playgroud)

第2组

...ChildC
...ChildD
Run Code Online (Sandbox Code Playgroud)

...

GroupN

...ChildM1
...ChildM2**
Run Code Online (Sandbox Code Playgroud)

默认情况下,组的左侧有一个箭头指示符.我想将箭头指示器更改为图像图标.我想为每个组设置不同的图像图标.例如,

Group1将有一个树图标.Group2将有一个动物图标,依此类推.

是否也可以为每个组中的每个孩子设置不同的图标指示器?如果是的话,我也很乐意就此提供一些指导.

我尝试了很多方法,但没有成功.是否与模拟器支持有关,因为我在模拟器上运行我的应用程序.

期待您的帮助.

谢谢,Adithya.

android expandablelistview android-emulator android-layout

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

Android 2.2应用程序是否适用于运行3.0及更高版本的平板电脑

我的基本问题是:开发Android应用程序与android 2.2 SDK是否适用于在Honeycomb(android 3.0)和更高版本上运行的Android平板电脑?

此外,为手机开发的应用程序是否适用于平板电脑

Adithya.

android android-3.0-honeycomb

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