2

I followed a tutorial with adb commands to install an application on my phone, but it is nowhere to be found on my phone.

I used the following command:

adb install androidapp.apk

Can someone please help me? It'll be really appreciated.

MethodManX
  • 949
  • 1
  • 8
  • 16

3 Answers3

0

Procedure to install the apk files in Android Emulator(AVD):

Check your installed directory(ex: C:\Program Files (x86)\Android\android-sdk\tools), whether it has the adb.exe or not). If not present in this folder, then download the attachment here, extract the zip files. You will get adb files, copy and paste those three files inside tools folder

Run AVD manager from C:\Program Files (x86)\Android\android-sdk and start the Android Emulator.

Copy and paste the apk file inside the C:\Program Files (x86)\Android\android-sdk\tools

  • Go to Start -> Run -> cmd

  • Type cd “C:\Program Files (x86)\Android\android-sdk\tools”

  • Type adb install example.apk

  • After getting success command

  • Go to Application icon in Android emulator, we can see the your application

Thank you.

Ponmalar
  • 6,871
  • 10
  • 50
  • 80
0

when application run on emulator it creates an .apk file on project/bin folder. you just connect your android phone with usb mass storage and then copy this apk to SD card. it will then install the app on phone by clicking the apk file on phone. Otherwise post your code to check

Ponmalar
  • 6,871
  • 10
  • 50
  • 80
  • I used the extract method to create the apk file – MethodManX May 22 '12 at 04:26
  • I'm not aware of this method... Can you please tell me more... While running the project apk file will be created automatically, then why you used this... – Ponmalar May 22 '12 at 04:30
  • `public class AndroidActivity extends Activity implements OnClickListener { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LinearLayout lin = new LinearLayout(this); lin.setOrientation(LinearLayout.VERTICAL); TextView text = new TextView(this); text.setText("Hello World"); lin.addView(text); Button button = new Button(this); lin.addView(button); setContentView(lin); button.setOnClickListener(this); button.setText("Click Here!!"); } }` – MethodManX May 22 '12 at 04:39
  • Please edit your question with this code... It will be more clear to check – Ponmalar May 22 '12 at 04:40
  • thats what the tutorial said. Ok i took the file from bin and put it on the storage of my device.. still same error.. heres my code: – MethodManX May 22 '12 at 04:41
  • even if i try to put the default android code on it with the helloworldactivity still gives me same error – MethodManX May 22 '12 at 04:41
0

If you're compiling and exporting your apk file under SDK version 2.1, it will not work on any android version below your SDK export "2.1". Android software is forward compatible not backward compatible. For example if you're programming using the android NDK (ann add-on to the android SDK) package that allows development in the C/C++ family, this is only compatible with android 2.3, android version 2.2 and below support java builds only. Therefore you will reaceive the "There is a problem parsing the package" error.

Create one new Project and choose AVD with version 2.1 now try to run in both

Ponmalar
  • 6,871
  • 10
  • 50
  • 80