与gcc我想建立一个DLL,它采用了Curl库.
后
$gcc -shared -o GA_TestLibV11.dll GA_TestLibV11.o GA_TestLibV11.def curllib_static.lib
$ gcc -shared -o GA_TestLibV11.dll GA_TestLibV11.o GA_TestLibV11.def curllib_static.lib -llibws2_32
Run Code Online (Sandbox Code Playgroud)
我收到以下警告(多次出现)
警告:.drectve`/manifestdependency:"type ='win32'name ='Microsoft.VC90.CRT'v ersion ='9.0.21022.8'inverlerArchitecture ='x86'publicKeyToken ='1fc8b3b9a1e18e3 b'"/ DEFAULTLIB:"MSVCRT"/ DEFAULTLIB:"OLDNAMES"'未被发现
以及以下错误:
curllib_static.lib(./Release/easy.obj):(.text[_win32_init]+0x7): undefined reference to `__security_cookie'
curllib_static.lib(./Release/easy.obj):(.text[_win32_init]+0x41): undefined reference to `@__security_check_cookie@4'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: curllib_st
atic.lib(./Release/easy.obj): bad reloc address 0x41 in section `.text[_win32_in
it]'
collect2.exe: error: ld returned 1 exit status
Run Code Online (Sandbox Code Playgroud)
还有什么可以链接来解决这些问题?
谢谢.
我正在创建一个聊天应用程序.我希望将我的png图像转换为9patch图像.我使用此链接.... http://android-ui-utils.googlecode.com/hg/asset-studio /dist/nine-patches.html
但问题是聊天气泡总是保持最小宽度,即使对于小消息也是如此.例如,如果我输入类似"hello"的文本,它会显示在宽度大于消息的气泡中.如何创建9patch形象好吗?
这是我的png图像

它的简单但在我的应用程序中创建问题.我正在使用Implicit Intent 发送电子邮件,将IMAGE附加为附件.但是使用以下代码创建问题.
File file = new File(path);
Intent emailIntent = new Intent(Intent.ACTION_SEND);
emailIntent.setType("vnd.android.cursor.dir/email");
emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[]{""});
emailIntent.putExtra(Intent.EXTRA_SUBJECT,"Wedding App");
emailIntent.putExtra(Intent.EXTRA_TEXT, "Sharing image via email.");
emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(file.toString()));
startActivity(Intent.createChooser(emailIntent, "Send mail..."));
Run Code Online (Sandbox Code Playgroud)
创建崩溃:
02-22 12:20:47.561: E/ActivityThread(6317): Activity com.android.internal.app.ChooserActivity has leaked IntentReceiver com.android.internal.app.ResolverActivity$1@417c1fc8 that was originally registered here. Are you missing a call to unregisterReceiver()?
02-22 12:20:47.561: E/ActivityThread(6317): android.app.IntentReceiverLeaked: Activity com.android.internal.app.ChooserActivity has leaked IntentReceiver com.android.internal.app.ResolverActivity$1@417c1fc8 that was originally registered here. Are you missing a call to unregisterReceiver()?
02-22 12:20:47.561: E/ActivityThread(6317): at android.app.LoadedApk$ReceiverDispatcher.<init>(LoadedApk.java:763) …Run Code Online (Sandbox Code Playgroud) 我有一个简单的应用程序,它实现了Activity.
我正在实施list-view onItemClickListener如下.但是,我需要在这个函数中创建一个Intent.
我怎样才能做到这一点?
listView.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView <? > arg0, View arg1, int arg2,
long arg3) {
// TODO Auto-generated method stub
Toast.makeText(getBaseContext(), "Click", Toast.LENGTH_LONG).show();
//need to create intent here to load view
Intent myintent = new Intent(this, MYclass.class);
// but this gives me error
myintent.putExtra("id", "test");
startActivity(myintent);
}
});
Run Code Online (Sandbox Code Playgroud) 以下是我的代码,
public class Assignment_Create extends Activity implements OnClickListener {
DataManipulator dataManipulator;
static final int DIALOG_ID = 1;
AlertDialog.Builder dialogAc;
ImageView imageViewDateAssign, imageViewDueDate, imageViewSubmit;
TextView textViewDtAssign, textViewDueDt;
EditText editTextTitle, editTextDesc;
static final int DATE_DIALOG_ID = 0;
int cDay, cMonth, cYear;
private TextView activeDateDisplay;
private Calendar activeDate;
// Update database
String updateId;
public boolean isEdit;
@Override
public void onCreate(Bundle savedInstanceState) {
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
super.onCreate(savedInstanceState);
setContentView(R.layout.assignment_create);
imageViewDateAssign = (ImageView) findViewById(R.id.dateassign);
imageViewDueDate = (ImageView) findViewById(R.id.duedate);
imageViewSubmit = (ImageView) findViewById(R.id.submit);
textViewDtAssign = (TextView) findViewById(R.id.textViewDateAssign);
textViewDueDt = …Run Code Online (Sandbox Code Playgroud) 我在自定义适配器列表视图中添加了两个微调器.一切都很好但是当我将新项目添加到列表视图时,前一项目的微调器的值将转换为新项目.在滚动列表中,微调器的视图值也会旋转.请帮忙.
public class CustomAdapter extends BaseAdapter {
private ArrayList<MyMessageDetails> _data;
Context _c;
ProductsItemViewHolder holder;
CustomAdapter (ArrayList<MyMessageDetails> data, Context c){
_data = data;
_c = c;
}
public int getCount() {
// TODO Auto-generated method stub
return _data.size();
}
public Object getItem(int position) {
// TODO Auto-generated method stub
return _data.get(position);
}
public long getItemId(int position) {
// TODO Auto-generated method stub
return position;
}
public View getView(int position, View convertView, ViewGroup parent) {
// …Run Code Online (Sandbox Code Playgroud) 我正在为Android构建一个新的锁定屏幕,但是我无法锁定通知栏以将其拉下来.
我想禁用通知栏下拉菜单.
我有以下代码片段从库中选择一个图像并将其放到图像视图中,现在我需要将其上传到服务器上!我在网上浏览了很多代码,但大多数代码都不起作用.谁能帮我这个 ?
public class MainActivity extends Activity {
ImageView viewImage;
Button b;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
b=(Button)findViewById(R.id.btnSelectPhoto);
viewImage=(ImageView)findViewById(R.id.viewImage);
b.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
selectImage();
}
});
}
private void selectImage() {
final CharSequence[] options = { "Take Photo", "Choose from Gallery","Cancel" };
AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
builder.setTitle("Add Photo!");
builder.setItems(options, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int item) {
if (options[item].equals("Take Photo"))
{
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
File f …Run Code Online (Sandbox Code Playgroud) 我试图在if语句中做一些事情,这适用于Android的每个版本(因为getDrawable都是16或更高版本),除了Android L(最新测试).代码如下:
if (item.getIcon().getConstantState().equals(getResources().getDrawable(R.drawable.add_to_fav_normal).getConstantState())
Run Code Online (Sandbox Code Playgroud)
任何帮助/提示或解释将不胜感激!
android ×8
curl ×1
dll ×1
email ×1
equals ×1
gcc ×1
imageview ×1
linker ×1
listview ×1
lockscreen ×1
memory-leaks ×1
nine-patch ×1
resources ×1