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.

Problem in parsing the package Android 2.1


AD MOB

Eclipse.
If install on device signed with proguard *.apk package and try to reinstall it by only signed package get error in parsing the package.
Uninstall the first application with bigger size from device and try install signed package which has a smaller size. Delete from download list previous downloaded *.apk.
This problem occurs when that your downloaded apk file size is less than the
size of the original apk.

397LW NO topic_id




AD

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


298

SurfaceView implements Runnable Android Code | surfaceview-implements-runnable-android-code



package cz.okhelp.surfview;

import android.os.Bundle;
import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.view.Menu;
import android.view.MotionEvent;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;
import android.view.View.OnTouchListener;

public class MainActivity extends Activity implements OnTouchListener {
	OurView v;
	Bitmap ball, blob;
	float x, y;
	Sprite sprite;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		// setContentView(R.layout.activity_our_view);
		v = new OurView(this);
		v.setOnTouchListener(this);
		ball = BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher);
		x = y = 0;
		setContentView(v);
	}


	@Override
	protected void onPause() {
		// TODO Auto-generated method stub
		super.onPause();
		v.pause();
	}

	@Override
	protected void onResume() {
		// TODO Auto-generated method stub
		super.onResume();
		v.resume();
	}

	public class OurView extends SurfaceView implements Runnable {
		Thread t = null;
		SurfaceHolder holder;
		boolean isItOK = false;

		public OurView(Context context) {
			super(context);
			// TODO Auto-generated constructor stub
			holder = getHolder();
		}

		public void run() {
			// TODO Auto-generated method stub
			while (isItOK == true) {
				// perform canvas drawing
				if (!holder.getSurface().isValid()) {
					continue;
				}
				// sprite = new Sprite(OurView.this,blob);
				Canvas c = holder.lockCanvas();
				c.drawARGB(255, 100, 100, 10);
				c.drawBitmap(ball, x, y, null);
				// onDraw(c);
				holder.unlockCanvasAndPost(c);
			}
		}

		protected void onDraw(Canvas canvas) {
			// sprite.onDraw(canvas);
		}

		public void pause() {
			isItOK = false;
			while (true) {
				try {
					t.join();
				} catch (InterruptedException e) {
					// TODO: handle exception
					e.printStackTrace();
				}
				break;
			}// end while
		}

		public void resume() {
			isItOK = true;
			t = new Thread(this);
			t.start();
		}
	}

	@Override
	public boolean onTouch(View v, MotionEvent event) {
		// TODO Auto-generated method stub
		try {
			Thread.sleep(50);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		switch (event.getAction()) {
		case MotionEvent.ACTION_DOWN:
			x = event.getX();
			y = event.getY();

			break;
		case MotionEvent.ACTION_UP:
			x = event.getX();
			y = event.getY();

			break;
		case MotionEvent.ACTION_MOVE:
			x = event.getX();
			y = event.getY();

			break;
		}// end switch

		return true;
	}

}

334

Android Studio Delete Hide Module | android-studio-delete-hide-module


To hide a module File->Project Structure Ctrl+Alt+Shift+S
In left panel click on Module which want to hide.
Click on minus symbol (-) on upper left corner of window.
Click Yes.

To delete module from disk click on module in project tree (to select) and press Delete on keyboard.
106

Statistics usability of mobile phones with Android - September 2011 | statistics-usability-of-mobile-phones-with-android-september-2011


(Our software)

 
1Samsung Galaxy S213.8% (1,232)
2Samsung Galaxy S8.5% (762)
3Samsung Galaxy Tab7.4% (659)
4Samsung Galaxy Mini5.4% (483)
5Samsung Galaxy S4.0% (356)
6HTC Desire HD3.8% (341)
7Samsung Galaxy Ace3.8% (339)
8HTC Wildfire3.2% (286)
9Samsung Galaxy Fit3.1% (274)
10SEMC Xperia X102.1% (190)
370

Android Studio failed to convert drawable into a drawable | android-studio-failed-to-convert-drawable-into-a-drawable


Try this:
- check names of drawables (file name must contain only abc...xyz 012...789 _ . in Resources folder ,
names have to start with lower case
MyImage.jpg == problem ,
names with space
my image.jpg == problem,
names with -
my-image.png == problem)
- check duplicate names with other extension ( my_image.jpg - my_image.png makes the problem)
- restart Android Studio
- if problem persist:
- check c:\Users\me\AndroidStudioProjects\myProject\myModule\build\intermediates\res\merged\debug\ drawable folder for corupted names or delete ALL drawable folders
- synk projekt, rebuild projekt
- if problem persist:
- restart Android Studio, wait for complete closure of the Android Studio!
123

R.java not generated - Android project in Eclipse issue | r-java-not-generating-android-project-in-eclipse-issue


If You create new xml file with prefix _ , for example _style.xml and You to clean project (Project->Clean), than package in folder project\gen will deleted with R.java class and new R.java not be created.

For to solving this problem You have to rename file without prefix _ as style.xml or name what You need and rebuild project.

If some ID cannot be resolved or is not a field get error occurence
You have to delete import android.R; in Activity.class if was inserted,
when this error is displayed.


Editace: 2014-02-15 20:45:48
Počet článků v kategorii: 397
Url:problem-in-parsing-the-package-android-2-1

AD
11 Share
Share
Tweet