2015-12-21 31 views
5

Ho provato a programmare un po 'l'API di Telegram in Android Studio, ma prima di tutto ho compilato BuildVars (il readme.txt ha dichiarato che devo farlo). Ed eseguire il Projekt e poi è venuto questo errore:API di Telegram release.keystore ERRORE

Error:A problem was found with the configuration of task ':TMessagesProj:packageDebug'. 
> File 'C:\Users\yanni\Desktop\Telegram-master\TMessagesProj\config\release.keystore' specified for property 'signingConfig.storeFile' does not exist. 

ho provato praticamente tutto, ma doesen't lavoro. Anche quando ho usato l'opzione APK firmato (da Android Studio) e l'ho installato sul mio telefono, l'APP si chiude sempre all'istante. Perché? Per favore aiutami e scusami per il mio inglese: D.

BUILDVARS:

package org.telegram.messenger; 

public class BuildVars { 
    public static boolean DEBUG_VERSION = false; 
    public static int BUILD_VERSION = 695; 
    public static int APP_ID = *****; //obtain your own APP_ID at https://core.telegram.org/api/obtaining_api_id 
    public static String APP_HASH = "**********"; //obtain your own APP_HASH at https://core.telegram.org/api/obtaining_api_id 
    public static String HOCKEY_APP_HASH = "your-hockeyapp-api-key-here"; 
    public static String HOCKEY_APP_HASH_DEBUG = "your-hockeyapp-api-key-here"; 
    public static String GCM_SENDER_ID = "760348033672"; 
    public static String SEND_LOGS_EMAIL = "[email protected]"; 
    public static String BING_SEARCH_KEY = ""; //obtain your own KEY at https://www.bing.com/dev/en-us/dev-center 
    public static String FOURSQUARE_API_KEY = ""; //obtain your own KEY at https://developer.foursquare.com/ 
    public static String FOURSQUARE_API_ID = ""; //obtain your own API_ID at https://developer.foursquare.com/ 
    public static String FOURSQUARE_API_VERSION = "20150326"; 
} 

GRADLEBUILD:

apply plugin: 'com.android.application' 

repositories { 
    mavenCentral() 
} 

dependencies { 
    compile 'com.android.support:support-v4:23.1.+' 
    compile 'com.google.android.gms:play-services:3.2.+' 
    compile 'net.hockeyapp.android:HockeySDK:3.6.+' 
    compile 'com.googlecode.mp4parser:isoparser:1.0.+' 
} 

android { 
    compileSdkVersion 23 
    buildToolsVersion '23.0.2' 

    useLibrary 'org.apache.http.legacy' 

    compileOptions { 
     sourceCompatibility JavaVersion.VERSION_1_7 
     targetCompatibility JavaVersion.VERSION_1_7 
    } 

    signingConfigs { 
     debug { 
      storeFile file("config/release.keystore") 
      storePassword "bebi22052014" 
      keyAlias "Yannick" 
      keyPassword "bebi22052014" 
     } 

     release { 
      storeFile file("config/release.keystore") 
      storePassword "bebi22052014" 
      keyAlias "Yannick" 
      keyPassword "bebi22052014" 
     } 
    } 

    buildTypes { 
     debug { 
      debuggable true 
      jniDebuggable true 
      signingConfig signingConfigs.debug 
      applicationIdSuffix ".beta" 
     } 

     release { 
      debuggable false 
      jniDebuggable false 
      signingConfig signingConfigs.release 
     } 

     foss { 
      debuggable false 
      jniDebuggable false 
      signingConfig signingConfigs.release 
     } 
    } 

    sourceSets.main { 
     jniLibs.srcDir 'libs' 
     jni.srcDirs = [] //disable automatic ndk-build call 
    } 

    sourceSets.debug { 
     manifest.srcFile 'config/debug/AndroidManifest.xml' 
    } 

    sourceSets.release { 
     manifest.srcFile 'config/release/AndroidManifest.xml' 
    } 

    sourceSets.foss { 
     manifest.srcFile 'config/foss/AndroidManifest.xml' 
    } 

    defaultConfig { 
     minSdkVersion 8 
     targetSdkVersion 23 
     versionCode 695 
     versionName "3.3.2" 
    } 
} 

Grazie,

Yannick!

Aggiornamento:

Ciao ho riempito in tutta la BuildVars:

package org.telegram.messenger; 

public class BuildVars { 
    public static boolean DEBUG_VERSION = false; 
    public static int BUILD_VERSION = 695; 
    public static int APP_ID = *****; //obtain your own APP_ID at https://core.telegram.org/api/obtaining_api_id 
    public static String APP_HASH = "***************************; //obtain your own APP_HASH at https://core.telegram.org/api/obtaining_api_id 
    public static String HOCKEY_APP_HASH = "**************"; 
    public static String HOCKEY_APP_HASH_DEBUG = "*************"; 
    public static String GCM_SENDER_ID = "760348033672"; 
    public static String SEND_LOGS_EMAIL = "[email protected]"; 
    public static String BING_SEARCH_KEY = "******************"; //obtain your own KEY at https://www.bing.com/dev/en-us/dev-center 
    public static String FOURSQUARE_API_KEY = "************"; //obtain your own KEY at https://developer.foursquare.com/ 
    public static String FOURSQUARE_API_ID = "***********"; //obtain your own API_ID at https://developer.foursquare.com/ 
    public static String FOURSQUARE_API_VERSION = "20150326"; 
} 

Il sapevano ERRORE:

12-21 20:25:22.854 15507-15507/org.telegram.messenger.beta E/art: No implementation found for void org.telegram.tgnet.ConnectionsManager.native_setJava(boolean) (tried Java_org_telegram_tgnet_ConnectionsManager_native_1setJava and Java_org_telegram_tgnet_ConnectionsManager_native_1setJava__Z) 
12-21 20:25:22.854 15507-15507/org.telegram.messenger.beta D/AndroidRuntime: Shutting down VM 
12-21 20:25:22.855 15507-15507/org.telegram.messenger.beta E/AndroidRuntime: FATAL EXCEPTION: main 
                      Process: org.telegram.messenger.beta, PID: 15507 
                      java.lang.UnsatisfiedLinkError: No implementation found for void org.telegram.tgnet.ConnectionsManager.native_setJava(boolean) (tried Java_org_telegram_tgnet_ConnectionsManager_native_1setJava and Java_org_telegram_tgnet_ConnectionsManager_native_1setJava__Z) 
                       at org.telegram.tgnet.ConnectionsManager.native_setJava(Native Method) 
                       at org.telegram.messenger.ApplicationLoader.onCreate(ApplicationLoader.java:278) 
                       at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1014) 
                       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4756) 
                       at android.app.ActivityThread.-wrap1(ActivityThread.java) 
                       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1424) 
                       at android.os.Handler.dispatchMessage(Handler.java:102) 
                       at android.os.Looper.loop(Looper.java:148) 
                       at android.app.ActivityThread.main(ActivityThread.java:5466) 
                       at java.lang.reflect.Method.invoke(Native Method) 
                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
+0

I supponi che il file esista? – njzk2

+0

Penso che il progetto deve crearlo .... Il gradlebuild lo dice,: D –

+0

'Il gradlebuild lo dice? cosa intendi? – njzk2

risposta

4

disattivare alcuni codice build.gradle

/* signingConfigs { 
    debug { 
     storeFile file("config/debug.keystore") 
    } 

    release { 
     storeFile file("config/release.keystore") 
     storePassword RELEASE_STORE_PASSWORD 
     keyAlias RELEASE_KEY_ALIAS 
     keyPassword RELEASE_KEY_PASSWORD 
    } 
}*/ 

buildTypes { 
    debug { 
     debuggable true 
     jniDebuggable true 
     // signingConfig signingConfigs.debug 
    } 

    release { 
     debuggable false 
     jniDebuggable false 
     // signingConfig signingConfigs.release 
    } 

    foss { 
     debuggable false 
     jniDebuggable false 
     // signingConfig signingConfigs.release 
    } 
}