我最近在我的Macbook Pro上下载了Android Studio,每次打开它时都会搞砸它.它给了我插件错误和其他几个错误.我需要从我的mac上完全卸载它.我试图从我的mac中删除它,然后再次安装,就像你第一次做的那样,但它没有做任何事情,现在出现同样的问题.
我怎样才能完全删除它并重新安装一个新的?
大家.
我刚开始在应用程序中购买应用程序.
这对我来说是新事物.
现在我在网上看到了一些例子,我发现在将结算库链接到它之前,github上的一个项目充满了错误.
当我这样做时,我刚解决了项目中的错误,但仍然有一个感叹号红色标记,因为android计费库包有错误.
我检查了错误,但我无法解决它,因为我不明白如何.
拜托,伙计们,我真的需要一些帮助.
我在这些行中得到了错误
@Override
public android.os.IBinder asBinder()
{
return this;
}
Run Code Online (Sandbox Code Playgroud)
在asBinder中的错误和它的说法"在这一行的多个标记
- The method asBinder() of type IMarketBillingService.Stub must override a superclass method
- implements android.os.IInterface.asBinder"
Run Code Online (Sandbox Code Playgroud)
与此代码相同,我也收到错误
@Override
public android.os.Bundle sendBillingRequest(android.os.Bundle bundle) throws android.os.RemoteException
{
android.os.Parcel _data = android.os.Parcel.obtain();
android.os.Parcel _reply = android.os.Parcel.obtain();
android.os.Bundle _result;
try {
_data.writeInterfaceToken(DESCRIPTOR);
if ((bundle!=null)) {
_data.writeInt(1);
bundle.writeToParcel(_data, 0);
} else {
_data.writeInt(0);
}
mRemote.transact(Stub.TRANSACTION_sendBillingRequest, _data, _reply, 0);
_reply.readException();
if ((0!=_reply.readInt()))
{
_result = android.os.Bundle.CREATOR.createFromParcel(_reply);
} else {
_result …Run Code Online (Sandbox Code Playgroud) 我发布了从画廊获取照片的意图,当我在我的画廊中使用nexus谷歌照片应用程序一切正常.
但如果图片不在手机上(在Google相片在线服务上),它会为我下载.选择图像后,我将图像发送到另一个活动进行裁剪,但在下载的情况下,发送到裁剪活动的图像为空,因为下载尚未完成.
如何知道下载完成后将图像发送到裁剪活动?
这是我的代码:
private void pickFromGallery()
{
Intent galleryIntent = new Intent(Intent.ACTION_PICK,android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(galleryIntent, RESULT_LOAD_IMG);
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
try {
// When an Image is picked
if (requestCode == RESULT_LOAD_IMG && resultCode == Activity.RESULT_OK
&& null != data) {
// Get the Image from data
Uri selectedImage = data.getData();
String[] filePathColumn = {MediaStore.Images.Media.DATA};
// Get the cursor
Cursor cursor = getApplicationContext().getContentResolver().query(selectedImage,
filePathColumn, null, null, null);
// Move to first …Run Code Online (Sandbox Code Playgroud) 我试图设置我的ImageView调整大小,但它不能通过位图或其他方法我将放置我的代码,所以如果任何人都可以帮助我如何调整大小ImageView以适应表行thnx.
public class Test extends Activity
{
private TableLayout Table1;
protected void onCreate(Bundle savedInstanceState)
{
int[] ImageArray={R.raw.hospital_image,R.raw.hotel_image};
super.onCreate(savedInstanceState);
setContentView(R.layout.favorites);
Table1 = (TableLayout) findViewById(R.id.Table);
TableRow.LayoutParams tableRowParams = new TableRow.LayoutParams(
TableRow.LayoutParams.WRAP_CONTENT,
TableRow.LayoutParams.WRAP_CONTENT, 1.0f);
for(int i=0;i<ImageArray.length;i++)
{
TableRow TR = new TableRow(this);
TR.setLayoutParams(tableRowParams);
ImageView img=new ImageView(this);
//What should i do here to resize it ???
Drawable d = getResources().getDrawable(ImageArray[i]);
img.setImageDrawable(d);
TR.addView(img, new TableRow.LayoutParams(
TableRow.LayoutParams.WRAP_CONTENT,
TableRow.LayoutParams.WRAP_CONTENT, 1.0f));
Table1.addView(TR);
}
}
Run Code Online (Sandbox Code Playgroud)
我的XMl只包含这些:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ScrollView …Run Code Online (Sandbox Code Playgroud) 我想替换我自己的列表而不是android.R.layout.simple_list_item_1但是我得到以下错误06-15 18:28:29.604:E/AndroidRuntime(3291):java.lang.IllegalStateException:ArrayAdapter需要资源ID一个TextView引起的:java.lang.ClassCastException:android.widget.RelativeLayout无法强制转换为android.widget.TextViewatandroid.widget.ArrayAdapter.createViewFromResource我无法设法解决它我的新列表看起来像这样
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:paddingLeft="10dp"
android:paddingTop="10dp"
android:textColor="#FFFFFF"
android:background="@drawable/burger_bg_selector"
android:textAppearance="?android:attr/textAppearanceMedium" />
<View
android:id="@+id/view1"
android:layout_width="wrap_content"
android:layout_height="1dp"
android:layout_alignParentLeft="true"
android:layout_below="@+id/textView1"
android:background="@drawable/main_list_sep"/>
Run Code Online (Sandbox Code Playgroud)
我的java类看起来像这样
public class MenuFragment extends ListFragment {
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
setListAdapter(new ArrayAdapter<String>(getActivity(),
R.layout.burger_list, new String[] { " First", " Second", " Third", " Fourth", " Fifth", " Sixth"}));
getListView().setCacheColorHint(0);
}
@Override
public void onListItemClick(ListView l, View v, int position, long id) {
super.onListItemClick(l, v, position, id);
((MenuActivity)getActivity()).getSlideoutHelper().close(); …Run Code Online (Sandbox Code Playgroud) 我刚刚更新了我的sdk tp版本23以及我的应用程序中的库,但是当运行应用程序时出现以下错误:com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException :进程'命令'/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/bin/java''以非零退出值2完成,我检查了它的含义它说可能重复库像在我的应用程序和库中的android模块v4和v7帖子说要排除这些库以防止重复,但我没有实现这里是我的应用程序gradle希望任何人都可以帮助我实现这一点谢谢.
enter code here
apply plugin: 'com.android.application'
android {
signingConfigs {
XXXX_release {
keyAlias 'XXXX'
keyPassword '123456'
storeFile file('XXX')
storePassword '123456'
}
}
compileSdkVersion 23
buildToolsVersion '23.0.0'
lintOptions
{
checkReleaseBuilds false
//abortOnError true
}
defaultConfig {
applicationId 'XXXXXX'
minSdkVersion 19
targetSdkVersion 23
versionCode 4
versionName "1.0"
multiDexEnabled true
}
buildTypes
{
release {
minifyEnabled true
proguardFiles './proguard-rules.pro'
//proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
dexOptions {
preDexLibraries = false
incremental true
}
configurations {
//all*.exclude group: 'com.android.support',module: 'support-v4'
// all*.exclude …Run Code Online (Sandbox Code Playgroud)