Okhelp.cz

Recepty, články, nápady, programování. Dříve dum-zahrada, finance, internet a know-how.okhelp.cz Pro lepší výsledky hledání používejte i diakritiku.

Unable to execute dex: Multiple dex files define Eclipse Android


AD MOB

Try each step separately:


  1. Restart Eclipse

  2. Clean project and rebuild

  3. Create a new project and try it if the problem persists, if no move copy project to other folder, delete project from workspace , create new project same name and copy java, xml etc. files to new project

  4. Close Eclipse, backup folder c:\Users\myName\workspace\.metadata and delete it. Restart Eclipse try again import project to workspace


  5. Re-installing the Android Developer Tools


  6. Re-installing Eclipse - rename old folder with Android to Android_old, create new folder C:\Program Files\Android and copy new Eclipse with sdk into new folder


  7. Created a new project importing from the file system


  8. Created a new project from subversion




397LW NO topic_id




AD

Další témata ....(Topics)


387

Error type 3 Activity class does not exist | error-type-3-activity-class-does-not-exist


Try some solution - each individually or all

  1. Check AndroidManifest.xml activity declaration
    <activity
                android:name=".EnableProfileActivity"
                android:label="@string/app_name" />


  2. Delete BUILD folder in module tree and Clean / Rebuild project

  3. Restart Android Studio

60

Get all ID from xml file for Android developers utility | get-all-id-from-xml-file-for-android-developers-utility


This software allow find all IDs from xml layout file source code and create variables with findViewById for onCreate, for onClick and load save preferences functions.
Get all ID is for Windows XP and higher.

2017,04,28
Download 1.0.2.0

[caption id="attachment_903" align="alignleft" width="300" caption="Get all ID from xml file for Android developers utility."]get-all-id-from-xml-file-android[/caption]
252

How get bitmap dimension without loading Android example | how-get-bitmap-dimension-without-loading-android-example


Bitmap Width, Height without memory allocation:

BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
BitmapFactory.decodeResource(getResources(), R.id.myimage, options);
// now opts.outWidth and opts.outHeight are the dimension of the
// bitmap, even though Bitmap is null
int imageHeight = options.outHeight;
int imageWidth = options.outWidth;
String imageType = options.outMimeType;
1

Create TextView dynamically Android sample | create-textview-dinamically


Example source code for Android Developers

// clickable TextView
public TextView createTextView(String sText, Context con){
 TextView b = null;
 try {
  b = new TextView (con);
  b.setTextSize(15.0f);
  b.setTextColor(Color.rgb( 0, 0, 200));
  b.setOnClickListener(this);
  b.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,
  LayoutParams.WRAP_CONTENT));
  b.setText(sText);
  //tr.addView(b, 60,30);
  } catch (Exception e) {
  e.printStackTrace();
 return b;
 }
return b;
}
/*****************/
public void onClick(View view) {
 try {
  String s = ((TextView) view).getText().toString();
 }
 catch (Exception e1) {
   e1.printStackTrace();
 }
}
/***********/

// if you want restore in TextView after chagne of orientation
// you have to put  code to Manifest.xml android:configChanges

activity android:name=".main"
android:label="@string/app_name"
android:configChanges="keyboardHidden|orientation" //this line important !!!!!!!

290

How disable Choreographer in LogCat Eclipse Android | how-to-disable-choreographer-messages


choreographer skipped frames
Create filter with TAG regex to disable Choreographer messages, see code and picture below:

^((?!Choreographer).)*$


choreographer-disable-remove


Editace: 2014-09-14 09:52:49
Počet článků v kategorii: 397
Url:unable-to-execute-dex-multiple-dex-files-define-eclipse-android

AD
11 Share
Share
Tweet