Two problems that may occur when two projects are imported through SVN (porting from Java to andorid), one android project and one common Java Project

Source: Internet
Author: User

Recently, many similar projects have been imported. One is a common Java project and the other is an android project,

The second step is to simply transplant the project to the one created by Android.

 

Export methods and problems:

Question 1:

First, export projects such as XXX and XXX-android respectively.

 

Then, you can see a red exclamation mark on the project icon ).

Is because the jar package is missing.

Right-click XXX-android project and open proprerties. Open Java build path to view the content on several tabs.

On the project tab, you may be prompted that the file is missing,

There are two possibilities for the files here: one is the lack of a complete Java project, and the other is the lack of jar packages (I am not very clear, just find these two possibilities)

If the complete Java project is missing and the name is the same as that of the project you just imported, add it.

 

If the jar package is missing and the imported project does not exist, it can only be separately stored (it may be in SVN, note the name it prompts)

 

Questions

Android: cocould not find method XXX, referenced from Method
Yyy

It may appear when another project is not added.

I checked answers from other countries.

Http://stackoverflow.com/questions/2349244/android-could-not-find-method-xxx-referenced-from-method-yyy

The original foreign answers are as follows:

If you updates your ADT to ADT 17

Then your library folder name cocould be the problem. It must be libsIf you have kept it lib please change it libsAnd then check

 

I have a similar problem when using external jar (jar extension package)

The reason I had a problem was due to a change in ADT 17 (or above ).
What I needed to do to resolve the problem was

1. In eclipse go to properties-& gt; Java build path-& gt; Order and export.
2. Mark my jar.
3. Move jar to top of the list.

 

The solution is to add the project to the project tab, put order and export on top, and check (if not, it is also possible that both projects contain jar conflicts. Although I have both, it seems that there is no problem. delete one and try again, remember to put it on top and hook it up) (what? You don't need to put it on top. It's hard to say, It's just insurance)


 

Attach the prompt information in logcat (many do not understand, have never met before, what is vfy ..)

E/dalvikvm (374): cocould not find class 'twitter4j. http. accesstoken ', referenced from method com. ECS. Android. sample. Twitter. twitterutils. isauthenticated

W/dalvikvm (374): vfy: unable to resolve new-instance 67 (ltwitter4j/HTTP/accesstoken;) in lcom/ECS/Android/sample/Twitter/twitterutils;

D/dalvikvm (374): vfy: replacing Opcode 0x22 at 0x0010

D/dalvikvm (374): vfy: Dead Code 0x0012-002f in lcom/ECS/Android/sample/Twitter/twitterutils;. isauthenticated (landroid/content/sharedpreferences;) Z

E/dalvikvm (374): cocould not find class 'twitter4j. http. accesstoken ', referenced from method com. ECS. Android. sample. Twitter. twitterutils. sendtweet

W/dalvikvm (374): vfy: unable to resolve new-instance 67 (ltwitter4j/HTTP/accesstoken;) in lcom/ECS/Android/sample/Twitter/twitterutils;

D/dalvikvm (374): vfy: replacing Opcode 0x22 at 0x0010

D/dalvikvm (374): vfy: Dead Code 0x0012-002b in lcom/ECS/Android/sample/Twitter/twitterutils ;. sendtweet (landroid/content/sharedpreferences; ljava/lang/string;) V

D/androidruntime (374): Shutting Down VM

W/dalvikvm (374): threadid = 1: thread exiting with uncaught exception (group = 0x40015560)

E/androidruntime (374): Fatal exception: Main

E/androidruntime (374): Java. Lang. noclassdeffounderror: twitter4j. http. accesstoken

.....

....

 

Question 2:

First, export projects such as XXX and XXX-android respectively.

However, no such problems have occurred,

However, an error is reported after compilation and running,

Java. Lang. noclassdeffounderror: class name in the new jar package

At this time, it is often because the jar package is not put on top and checked in order and export after it is included (if you have imported the jar package)

Let's take a closer look at the steps to solve problem 1. (What? You don't need to put it on top. It's hard to say, It's just insurance)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.