2 Commits

Author SHA1 Message Date
ScorpioMiku
028fc613b8 1 2018-11-12 20:46:24 +08:00
ScorpioMiku
9708b65292 bug 2018-11-09 20:44:37 +08:00
4 changed files with 14 additions and 15 deletions

View File

@@ -33,7 +33,6 @@
android:name=".NutritionMaster" android:name=".NutritionMaster"
android:allowBackup="true" android:allowBackup="true"
android:hardwareAccelerated="false"
android:icon="@mipmap/ic" android:icon="@mipmap/ic"
android:label="@string/app_name" android:label="@string/app_name"
android:roundIcon="@mipmap/ic" android:roundIcon="@mipmap/ic"

View File

@@ -203,10 +203,7 @@ public class ClassifierCamera extends AppCompatActivity {
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, bos); bitmap.compress(Bitmap.CompressFormat.JPEG, 100, bos);
bos.flush(); bos.flush();
bos.close(); bos.close();
// bitmap = CompressHelper.getDefault(getApplicationContext()).compressToBitmap(file);
// ByteArrayOutputStream baos = new ByteArrayOutputStream();
// bitmap.compress(Bitmap.CompressFormat.PNG, 100, baos);
// byte[] dat = baos.toByteArray();
String imgStr = Base64.encodeToString(data, Base64.DEFAULT); String imgStr = Base64.encodeToString(data, Base64.DEFAULT);
String imgParam = URLEncoder.encode(imgStr, "UTF-8"); String imgParam = URLEncoder.encode(imgStr, "UTF-8");
final String param = "image=" + imgParam + "&top_num=" + 1; final String param = "image=" + imgParam + "&top_num=" + 1;

View File

@@ -2,12 +2,13 @@
buildscript { buildscript {
repositories { repositories {
google() google()
jcenter() jcenter()
mavenCentral() mavenCentral()
maven { url 'https://jitpack.io' }
maven { url 'https://bintray.com/rameshbhupathi/maven' }
maven { url "https://dl.bintray.com/thelasterstar/maven/" }
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.1.3' classpath 'com.android.tools.build:gradle:3.1.3'
@@ -21,11 +22,13 @@ buildscript {
allprojects { allprojects {
repositories { repositories {
mavenCentral()
google() google()
jcenter() jcenter()
mavenCentral()
maven { url 'https://jitpack.io' } maven { url 'https://jitpack.io' }
maven { url 'https://bintray.com/rameshbhupathi/maven' } maven { url 'https://bintray.com/rameshbhupathi/maven' }
maven { url "https://dl.bintray.com/thelasterstar/maven/" }
} }
} }

View File

@@ -22,13 +22,13 @@ android {
} }
dependencies { dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:26.1.0' implementation 'com.android.support:appcompat-v7:26.1.0'
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations' exclude group: 'com.android.support', module: 'support-annotations'
}) })
testCompile 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
testCompile 'org.robolectric:robolectric:3.0-rc3' testImplementation 'org.robolectric:robolectric:3.0-rc3'
testCompile 'org.mockito:mockito-core:1.+' testImplementation 'org.mockito:mockito-core:1.+'
compile files('libs/microlog4android-1.0.0.jar') implementation files('libs/microlog4android-1.0.0.jar')
} }