0

我將Android Studio更新爲最新版本,並將Graddle更新爲3.3版本。 現在運行的應用程序的一切,當去很好,除了這個錯誤在Parse.com查詢:導航抽屜內的ParseQuery錯誤驗證程序拒絕類com.parse.ParseQuery

Log: 09-25 10:33:53.846 6313-6640/com.xxxxxx.xxxxxxxxE/art: Verification failed on class com.parse.ParseQuery in /data/app/com.dogelier.dogelier-2/base.apk:classes30.dex because: Verifier rejected class com.parse.ParseQuery due to bad method void com.parse.ParseQuery.checkIfRunning(boolean) 09-25 10:33:53.846 6313-6640/com.dogelier.dogelier E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #5 Process: com.xxxxx.xxxxx, PID: 6313 java.lang.RuntimeException: An error occured while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:300) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355) at java.util.concurrent.FutureTask.setException(FutureTask.java:222) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818) Caused by: java.lang.VerifyError: Verifier rejected class com.parse.ParseQuery due to bad method void com.parse.ParseQuery.checkIfRunning(boolean) (declaration of 'com.parse.ParseQuery' appears in /data/app/com.dogelier.dogelier-2/base.apk:classes30.dex) at com.dogelier.dogelier.Navegacion$RemoteDataTask.doInBackground(Navegacion.java:486) at com.dogelier.dogelier.Navegacion$RemoteDataTask.doInBackground(Navegacion.java:462) at android.os.AsyncTask$2.call(AsyncTask.java:288) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818)

Error LINE 


private class RemoteDataTask extends AsyncTask<Void, Void, Void> { 
    @Override 
    protected void onPreExecute() { 
     super.onPreExecute(); 

     progress = new GifLoadingView(); 
     progress.setImageResource(R.drawable.dogelier3); 
     progress.setDimming(false); 
     progress.show(getFragmentManager(), ""); 


    } 



    @Override 
    protected Void doInBackground(Void... params) { 
     // Create the array 
     dogelieropulationlist = new ArrayList<DogelierPopulation>(); 

     try { 
      // ERROR LINE HERE IN PARSEQUERY 
      ParseQuery<ParseObject> query = new ParseQuery<ParseObject>("Doghoteliers"); 
      // Locate the column named "ranknum" in Parse.com and order list 
      // by ascending 
      //query.orderByAscending(""); 
      query.whereEqualTo("activado", true); 
      query.setLimit(limit); 


      ob = query.find(); 
      for (final ParseObject dogelier : ob) { 
       // Locate images in flag column 

      final DogelierPopulation map = new DogelierPopulation(); 

       ParseFile image = (ParseFile) dogelier.get("foto"); 
       image.getData(); 
       Bitmap bmp = BitmapFactory 
         .decodeByteArray(
           image.getData(), 0, image.getData().length); 

       map.setFoto(bmp); 

       map.setDireccion((String) dogelier.get("ciudad")); 
       map.setNombre((String) dogelier.get("Nombre")); 
       map.setTitulo((String) dogelier.get("titulo")); 
       map.setDescripcion((String) dogelier.get("presentacion")); 
       map.setPrecio((String) dogelier.get("precio")); 
       map.setEstrellas(dogelier.getInt("Estrellas")); 

       dogelieropulationlist.add(0,map); 




      } 
     } catch (ParseException e) { 
      Log.e("Error1", e.getMessage()); 
      e.printStackTrace(); 
      errorFragment = new ErrorFragment(); 
      manager = getSupportFragmentManager(); 
      manager.beginTransaction().replace(R.id.content_navegacion, 
      errorFragment).commit(); 


     } 
     return null; 
    } 

    @Override 
    protected void onPostExecute(Void result) { 
     // Locate the listview in listview_main.xml 

     listview = (ListView) findViewById(R.id.listview); 
     // Pass the results into ListViewAdapter.java 
     adapter = new ListViewAdapter(Navegacion.this, 
       dogelieropulationlist); 
     // Binds the Adapter to the ListView 
     listview.setAdapter(adapter); 
     CloseProgress(progress); 
     swipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.swipe_refresh_layout); 
     swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { 
      @Override 
      public void onRefresh() { 
       swipeRefreshLayout.post(new Runnable() { 
              @Override 
              public void run() { 
               swipeRefreshLayout.setRefreshing(true); 

               new LoadMoreDataTask().execute(); 
              } 
             } 
       ); 
      } 
     }); 



    } 



GRADDLE 

apply plugin: 'com.android.application' 

android { 
    signingConfigs { 
     config { 
      keyAlias 'Xxxxxx' 
      keyPassword 'xxxxxxxx' 
      storeFile file('C:/KeyStores/xxxxxx.jks') 
      storePassword 'xxxxxxxx' 
     } 
    } 
    compileSdkVersion 26 
    buildToolsVersion '25.0.1' 
    defaultConfig { 
     applicationId "com.xxxxxx.xxxxxxx" 
     minSdkVersion 21 
     targetSdkVersion 25 
     versionCode 1 
     versionName "1.0" 
     multiDexEnabled true 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
      signingConfig signingConfigs.config 
     } 
     debug { 
     } 
    } 
    dexOptions { 
     javaMaxHeapSize "4g" 
    } 

    packagingOptions { 
     exclude 'META-INF/LICENSE' 
     exclude 'META-INF/NOTICE' 
    } } 




repositories { 
    mavenCentral() 
    maven { url 'https://oss.sonatype.org/content/repositories/snapshots' } 
    jcenter() 
    maven { url "https://jitpack.io" } 
    maven { url "https://maven.google.com" } 

} 

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    testCompile 'junit:junit:4.12' 
    compile files('libs/httpclient-android-4.3.5.1.jar') 
    compile files('libs/apache-commons-codec-1.4.jar') 
    compile 'com.android.support:appcompat-v7:26.0.1' 
    compile 'com.android.support:design:26.0.1' 
    compile 'com.android.support:support-v4:26.0.1' 
    compile 'com.android.support:recyclerview-v7:26.0.1' 
    compile 'com.android.support:cardview-v7:26.0.1' 
    compile 'com.parse:parse-android:1.15.2' 
    compile 'pl.bclogic:pulsator4droid:1.0.3' 
    compile 'com.squareup.picasso:picasso:2.5.2' 
    compile 'com.pkmmte.view:circularimageview:1.1' 
    compile 'com.parse:parsefacebookutils-v4-android:[email protected]' 
    compile 'com.facebook.android:facebook-android-sdk:4.7.0' 
    compile 'com.parse:parseui-login-android:0.0.2' 
    compile 'com.parse:parseui-widget-android:0.0.2' 
    compile 'com.parse:parsetwitterutils-android:1.10.3' 
    compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2' 
    compile 'org.apache.directory.studio:org.apache.commons.io:2.4' 
    compile 'com.theartofdev.edmodo:android-image-cropper:2.3.1' 
    compile 'com.google.android.gms:play-services-maps:11.0.4' 
    compile 'com.google.android.gms:play-services-location:11.0.4' 
    compile 'fr.tvbarthel.blurdialogfragment:lib:2.2.0' 
    compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.4' 
    compile 'com.roomorama:caldroid:3.0.1' 
    compile 'com.seatgeek:placesautocomplete:0.2-SNAPSHOT' 
    compile 'com.github.andremion:louvre:1.2.0' 
    compile 'com.github.sharish:CreditCardView:v1.0.4' 
    compile 'com.wdullaer:materialdatetimepicker:3.3.0' 
    compile 'com.nineoldandroids:library:2.4.0' 
    compile 'com.daimajia.easing:library:[email protected]' 
    compile 'com.daimajia.androidanimations:library:[email protected]' 
    compile 'hanks.xyz:smallbang-library:0.1.2' 
    compile 'com.akhgupta:android-easylocation:1.0.1' 
    compile 'com.google.code.gson:gson:2.7' 
    compile 'com.stripe:stripe-android:4.1.5' 
    compile 'com.parse:parse-livequery-android:1.0.4' 
    compile 'com.github.githubwing:DragPhotoView:1.0.1' 
    compile 'me.shaohui.advancedluban:library:1.3.5' 
    compile 'com.google.android.gms:play-services-auth:11.0.4' 
    compile 'com.google.android.gms:play-services-gcm:11.0.4' 
    compile 'com.stepstone.apprating:app-rating:1.2.0' 
    compile 'com.sandrios.android:sandriosCamera:1.0.8' 
    compile 'com.android.support:percent:26.0.1' 
    compile 'com.google.android.gms:play-services-places:11.0.4' 
    compile 'com.android.support:multidex:1.0.0' 

} 
+1

您可能想了解[parse is gone](https://stackoverflow.com/questions/45420209/com-parse-parseexception-bolts-executorexception-an-exception-was-thrown-by-an/45420303 #45420303) –

+0

我知道已經走了,但我使用了一個Parse服務器庫,特別是Sashido。 –

+0

我不能在這種情況下引導你,但由於相同的原因錯誤發生,因爲:驗證器拒絕類com.parse.ParseQuery由於壞方法void com.parse.ParseQuery.checkIfRunning(boolean)'可能由於一些配置問題 –

回答

0

我發現錯誤,如果有人有它的未來。解析sdk,ParseUI和Facebook sdk我的衝突,如果他們不指向相同的版本,所以只要確保它們都是兼容的。